diff options
author | LASER-Yi <[email protected]> | 2021-08-22 16:54:38 +0800 |
---|---|---|
committer | LASER-Yi <[email protected]> | 2021-08-22 16:54:38 +0800 |
commit | 42f5be9ae32d8432e59d1555ccc50f51068e3acb (patch) | |
tree | 8df5b2949f3d62b2a64ad437cc77fb306c9eb580 /frontend | |
parent | 9765c5713c5739573712f9eeb7daaef2a811e0e6 (diff) | |
download | bazarr-42f5be9ae32d8432e59d1555ccc50f51068e3acb.tar.gz bazarr-42f5be9ae32d8432e59d1555ccc50f51068e3acb.zip |
no log: Fix a issue that a non-serialize object is used in redux reducers
Diffstat (limited to 'frontend')
-rw-r--r-- | frontend/src/@redux/reducers/site.ts | 6 | ||||
-rw-r--r-- | frontend/src/App/Notification.tsx | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/frontend/src/@redux/reducers/site.ts b/frontend/src/@redux/reducers/site.ts index 07796c186..bf6bed9fb 100644 --- a/frontend/src/@redux/reducers/site.ts +++ b/frontend/src/@redux/reducers/site.ts @@ -24,7 +24,7 @@ interface Site { progress: Site.Progress[]; notifier: { content: string | null; - update: Date; + timestamp: string; }; notifications: Server.Notification[]; sidebar: string; @@ -37,7 +37,7 @@ const defaultSite: Site = { progress: [], notifier: { content: null, - update: new Date(), + timestamp: String(Date.now), }, notifications: [], sidebar: "", @@ -111,7 +111,7 @@ const reducer = createReducer(defaultSite, (builder) => { builder.addCase(siteUpdateNotifier, (state, action) => { state.notifier.content = action.payload; - state.notifier.update = new Date(); + state.notifier.timestamp = String(Date.now); }); builder diff --git a/frontend/src/App/Notification.tsx b/frontend/src/App/Notification.tsx index ccb6fc4cc..9b9feabc5 100644 --- a/frontend/src/App/Notification.tsx +++ b/frontend/src/App/Notification.tsx @@ -154,7 +154,7 @@ const NotificationCenter: FunctionComponent = () => { if (notifier.content) { setTooltip(true); } - }, [notifier.update]); + }, [notifier.timestamp]); return ( <React.Fragment> |