reactive-di
Advanced tools
Comparing version 3.1.2 to 3.1.3
@@ -104,6 +104,9 @@ 'use strict'; | ||
var source = this._source; | ||
source.merge(v); | ||
var observer = this._updater; | ||
if (observer && observer.next) { | ||
observer.next(v); | ||
if (v) { | ||
source.merge(v); | ||
if (observer && observer.next) { | ||
observer.next(v); | ||
} | ||
this._v = v; | ||
} | ||
@@ -113,3 +116,2 @@ notifier.opId = oldId; | ||
notifier.flush(); | ||
this._v = v; | ||
}; | ||
@@ -116,0 +118,0 @@ |
{ | ||
"name": "reactive-di", | ||
"version": "3.1.2", | ||
"version": "3.1.3", | ||
"description": "Reactive dependency injection", | ||
@@ -5,0 +5,0 @@ "publishConfig": { |
@@ -31,3 +31,3 @@ // @flow | ||
type IUpdaterBase<V> = { | ||
next?: (v: V) => void; | ||
next?: (v: ?V) => void; | ||
complete?: (v: ?V) => void; | ||
@@ -38,6 +38,6 @@ error?: (e: Error) => void; | ||
export type IUpdater<V> = IUpdaterBase<V> & { | ||
promise: () => Promise<V>; | ||
promise: () => Promise<any>; | ||
} | IUpdaterBase<V> & { | ||
promise: void; | ||
observable: () => Observable<V, Error>; | ||
observable: () => Observable<any | void, Error>; | ||
} | ||
@@ -44,0 +44,0 @@ |
@@ -91,3 +91,3 @@ // @flow | ||
this._subscription = updater.observable() | ||
.subscribe((this: Observer<V, Error>)) | ||
.subscribe((this: Observer<?V, Error>)) | ||
} | ||
@@ -104,3 +104,3 @@ } | ||
next(v: V): void { | ||
next(v: ?V): void { | ||
if (this._isCanceled) { | ||
@@ -115,6 +115,9 @@ return | ||
const source = this._source | ||
source.merge(v) | ||
const observer = this._updater | ||
if (observer && observer.next) { | ||
observer.next(v) | ||
if (v) { | ||
source.merge(v) | ||
if (observer && observer.next) { | ||
observer.next(v) | ||
} | ||
this._v = v | ||
} | ||
@@ -124,3 +127,2 @@ notifier.opId = oldId | ||
notifier.flush() | ||
this._v = v | ||
} | ||
@@ -127,0 +129,0 @@ |
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
365171
5056