monkey-front-core 0.0.314 → 0.0.316
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/esm2020/lib/core/services/storage/monkeyecx-token-storage.service.mjs +2 -2
- package/esm2020/lib/store/reducers/monkeyecx-seeder.reducer.mjs +15 -14
- package/fesm2015/monkey-front-core.mjs +12 -11
- package/fesm2015/monkey-front-core.mjs.map +1 -1
- package/fesm2020/monkey-front-core.mjs +15 -14
- package/fesm2020/monkey-front-core.mjs.map +1 -1
- package/monkey-front-core-0.0.316.tgz +0 -0
- package/package.json +1 -1
- package/monkey-front-core-0.0.314.tgz +0 -0
|
@@ -2455,6 +2455,7 @@ const seederReducer = (keys) => {
|
|
|
2455
2455
|
return (reducer) => {
|
|
2456
2456
|
return (state, action) => {
|
|
2457
2457
|
const handledState = reducer(state, action);
|
|
2458
|
+
let data = handledState;
|
|
2458
2459
|
if (action.type === INIT || action.type === UPDATE) {
|
|
2459
2460
|
const storageValue = localStorage.getItem('mecx-store');
|
|
2460
2461
|
if (storageValue) {
|
|
@@ -2469,19 +2470,19 @@ const seederReducer = (keys) => {
|
|
|
2469
2470
|
localStorage.removeItem('mecx-store');
|
|
2470
2471
|
}
|
|
2471
2472
|
}
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
2477
|
-
|
|
2478
|
-
|
|
2479
|
-
};
|
|
2480
|
-
|
|
2481
|
-
|
|
2482
|
-
|
|
2483
|
-
|
|
2484
|
-
|
|
2473
|
+
data = null;
|
|
2474
|
+
try {
|
|
2475
|
+
keys.forEach((key) => {
|
|
2476
|
+
data = {
|
|
2477
|
+
...data,
|
|
2478
|
+
[key]: handledState[key]
|
|
2479
|
+
};
|
|
2480
|
+
});
|
|
2481
|
+
localStorage.setItem('mecx-store', btoa(JSON.stringify(data)));
|
|
2482
|
+
}
|
|
2483
|
+
catch (e) {
|
|
2484
|
+
localStorage.removeItem('mecx-store');
|
|
2485
|
+
}
|
|
2485
2486
|
}
|
|
2486
2487
|
return data || handledState;
|
|
2487
2488
|
};
|
|
@@ -3676,7 +3677,7 @@ class MonkeyEcxTokenStorageService {
|
|
|
3676
3677
|
const handledData = {
|
|
3677
3678
|
...data
|
|
3678
3679
|
};
|
|
3679
|
-
if (
|
|
3680
|
+
if (!data?.program && config?.program) {
|
|
3680
3681
|
handledData.program = config?.program?.token;
|
|
3681
3682
|
}
|
|
3682
3683
|
delete handledData?.me;
|