evg_observable 1.1.30 → 1.1.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
package/src/outLib/Observable.js
CHANGED
|
@@ -24,6 +24,7 @@ class SubscribeObject {
|
|
|
24
24
|
subsObj.unsubscribe();
|
|
25
25
|
return;
|
|
26
26
|
case subsObj.isListenPaused:
|
|
27
|
+
;
|
|
27
28
|
return;
|
|
28
29
|
case subsObj.once.isOnce:
|
|
29
30
|
subsObj.once.isFinished = true;
|
|
@@ -152,13 +153,18 @@ class Observable {
|
|
|
152
153
|
return;
|
|
153
154
|
this.value = value;
|
|
154
155
|
this.isNextProcess = true;
|
|
155
|
-
|
|
156
|
+
const length = this.listeners.length;
|
|
157
|
+
for (let i = 0; i < length; i++) {
|
|
158
|
+
const listener = this.listeners[i];
|
|
156
159
|
listener && listener.send(value);
|
|
160
|
+
}
|
|
157
161
|
this.isNextProcess = false;
|
|
158
|
-
this.handleListenersForUnsubscribe();
|
|
162
|
+
this.listenersForUnsubscribe.length && this.handleListenersForUnsubscribe();
|
|
159
163
|
}
|
|
160
164
|
handleListenersForUnsubscribe() {
|
|
161
|
-
|
|
165
|
+
const length = this.listenersForUnsubscribe.length;
|
|
166
|
+
for (let i = 0; i < length; i++) {
|
|
167
|
+
const listener = this.listenersForUnsubscribe[i];
|
|
162
168
|
this.unSubscribe(listener);
|
|
163
169
|
}
|
|
164
170
|
this.listenersForUnsubscribe.length = 0;
|
/package/{LICENSE.md → LICENSE}
RENAMED
|
File without changes
|