@lowentry/react-redux 0.2.4 → 0.2.5
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/LeRed.js +14 -10
- package/package.json +1 -1
package/LeRed.js
CHANGED
|
@@ -77,6 +77,7 @@ export const LeRed = (() =>
|
|
|
77
77
|
|
|
78
78
|
LeRed.effects.interval = function* (callback, intervalMs)
|
|
79
79
|
{
|
|
80
|
+
// noinspection JSUnresolvedReference
|
|
80
81
|
let channel = LeRed.eventChannel((emitter) =>
|
|
81
82
|
{
|
|
82
83
|
const interval = setInterval(() =>
|
|
@@ -120,6 +121,7 @@ export const LeRed = (() =>
|
|
|
120
121
|
{
|
|
121
122
|
try
|
|
122
123
|
{
|
|
124
|
+
// noinspection JSUnresolvedReference
|
|
123
125
|
if(yield LeRed.effects.cancelled())
|
|
124
126
|
{
|
|
125
127
|
channel.close();
|
|
@@ -192,9 +194,12 @@ export const LeRed = (() =>
|
|
|
192
194
|
{
|
|
193
195
|
return storeData;
|
|
194
196
|
}
|
|
197
|
+
// noinspection JSUnresolvedReference
|
|
195
198
|
if(ISSET(storeData.slices))
|
|
196
199
|
{
|
|
200
|
+
// noinspection JSUnresolvedReference
|
|
197
201
|
storeData.reducer = storeData.slices;
|
|
202
|
+
// noinspection JSUnresolvedReference
|
|
198
203
|
delete storeData.slices;
|
|
199
204
|
}
|
|
200
205
|
let sagaListeners = [];
|
|
@@ -455,6 +460,7 @@ export const LeRed = (() =>
|
|
|
455
460
|
{
|
|
456
461
|
const sagaListener = function* ()
|
|
457
462
|
{
|
|
463
|
+
// noinspection JSUnresolvedReference
|
|
458
464
|
yield ReduxSagaEffects.takeEvery(reducerAction, function* (action)
|
|
459
465
|
{
|
|
460
466
|
let promiseResolve = null;
|
|
@@ -782,26 +788,24 @@ export const LeRed = (() =>
|
|
|
782
788
|
{
|
|
783
789
|
let stop = false;
|
|
784
790
|
|
|
785
|
-
let end;
|
|
786
|
-
|
|
787
791
|
const run = () =>
|
|
788
792
|
{
|
|
789
793
|
if(stop)
|
|
790
794
|
{
|
|
791
795
|
return;
|
|
792
796
|
}
|
|
797
|
+
stop = true;
|
|
798
|
+
if(typeof window !== 'undefined')
|
|
799
|
+
{
|
|
800
|
+
window.removeEventListener('beforeunload', run);
|
|
801
|
+
}
|
|
793
802
|
callable();
|
|
794
|
-
end();
|
|
795
803
|
};
|
|
796
804
|
|
|
797
|
-
|
|
805
|
+
if(typeof window !== 'undefined')
|
|
798
806
|
{
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
};
|
|
802
|
-
|
|
803
|
-
window?.addEventListener('beforeunload', run);
|
|
804
|
-
|
|
807
|
+
window.addEventListener('beforeunload', run);
|
|
808
|
+
}
|
|
805
809
|
return run;
|
|
806
810
|
}, [comparingValues, equalsComparator]);
|
|
807
811
|
};
|