jamespot-front-business 1.1.71 → 1.1.72
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/dist/cjs.js +11 -5
- package/dist/cjs.js.map +1 -1
- package/dist/esm.js +11 -5
- package/dist/esm.js.map +1 -1
- package/dist/types.d.ts +4 -4
- package/package.json +2 -2
package/dist/cjs.js
CHANGED
|
@@ -90,6 +90,10 @@ const Toast = {
|
|
|
90
90
|
selectors: selectors$3,
|
|
91
91
|
};
|
|
92
92
|
|
|
93
|
+
const isAbortError = (error) => {
|
|
94
|
+
return !!error && typeof error === 'object' && 'aborted' in error && !!error.aborted;
|
|
95
|
+
};
|
|
96
|
+
|
|
93
97
|
const initialState$m = {
|
|
94
98
|
animationConfiguration: null,
|
|
95
99
|
isActiveForCurrentUser: false,
|
|
@@ -122,14 +126,16 @@ const animationsListSlice = toolkit.createSlice({
|
|
|
122
126
|
});
|
|
123
127
|
},
|
|
124
128
|
});
|
|
125
|
-
const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
129
|
+
const fetchCurrentAnimation = toolkit.createAsyncThunk('animations/fetchCurrentAnimation', (_, { extra, rejectWithValue, dispatch, signal }) => __awaiter(void 0, void 0, void 0, function* () {
|
|
126
130
|
try {
|
|
127
|
-
const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation()).result;
|
|
128
|
-
const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive()).result;
|
|
131
|
+
const animationConfiguration = (yield extra.jApi.animations.GetCurrentAnimation({ signal })).result;
|
|
132
|
+
const isActiveForCurrentUser = (yield extra.jApi.animations.GetAnimationActive({ signal })).result;
|
|
129
133
|
return { animationConfiguration, isActiveForCurrentUser, isInitialized: true };
|
|
130
134
|
}
|
|
131
|
-
catch (
|
|
132
|
-
|
|
135
|
+
catch (err) {
|
|
136
|
+
if (!isAbortError(err)) {
|
|
137
|
+
dispatch(Toast.actions.error({ label: 'GLOBAL_Technical_Error' }));
|
|
138
|
+
}
|
|
133
139
|
return rejectWithValue({ error: 1, errorMsg: 'Cannot retrieve animation' });
|
|
134
140
|
}
|
|
135
141
|
}));
|