@equinor/fusion-framework-module-context
Advanced tools
Comparing version 4.0.1 to 4.0.2
@@ -6,2 +6,8 @@ # Change Log | ||
## 4.0.2 (2023-05-10) | ||
### Bug Fixes | ||
- **module-context:** only skip first context item if not resolved ([cea6fce](https://github.com/equinor/fusion-framework/commit/cea6fcefd4853dcfbedf0d65d83cac7ac1b26523)) | ||
## [4.0.1](https://github.com/equinor/fusion-framework/compare/@equinor/fusion-framework-module-context@4.0.0...@equinor/fusion-framework-module-context@4.0.1) (2023-05-08) | ||
@@ -8,0 +14,0 @@ |
@@ -91,3 +91,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
connectParentContext(provider, opt) { | ||
const parentContext$ = provider.currentContext$.pipe(filter((next, index) => { | ||
const parentContext$ = provider.currentContext$.pipe(filter((x) => x !== undefined), filter((next, index) => { | ||
if ((opt === null || opt === void 0 ? void 0 : opt.skipFirst) && index <= 1) { | ||
@@ -94,0 +94,0 @@ console.debug('ContextProvider::connectParentContext', 'skipping first item', next); |
@@ -42,3 +42,5 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
complete: () => { | ||
provider.connectParentContext(parentProvider, { skipFirst: true }); | ||
provider.connectParentContext(parentProvider, { | ||
skipFirst: !!provider.currentContext, | ||
}); | ||
subscriber.complete(); | ||
@@ -45,0 +47,0 @@ }, |
{ | ||
"name": "@equinor/fusion-framework-module-context", | ||
"version": "4.0.1", | ||
"version": "4.0.2", | ||
"description": "", | ||
@@ -52,3 +52,3 @@ "main": "./dist/esm/index.js", | ||
}, | ||
"gitHead": "862588939c464180381dcd300504353b133209ae" | ||
"gitHead": "3cd1a9e01c56fc9afb72f2df474a7b066b4215c4" | ||
} |
@@ -169,2 +169,4 @@ import { | ||
const parentContext$ = provider.currentContext$.pipe( | ||
// do not set context if parent has not initialized | ||
filter((x) => x !== undefined), | ||
filter((next, index) => { | ||
@@ -171,0 +173,0 @@ if (opt?.skipFirst && index <= 1) { |
@@ -70,3 +70,6 @@ import { catchError, EMPTY, from, Observable, switchMap, filter, Subscription } from 'rxjs'; | ||
complete: () => { | ||
provider.connectParentContext(parentProvider, { skipFirst: true }); | ||
// TODO - do we need to check first? | ||
provider.connectParentContext(parentProvider, { | ||
skipFirst: !!provider.currentContext, | ||
}); | ||
subscriber.complete(); | ||
@@ -73,0 +76,0 @@ }, |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
268302
1919