From b5ad3e5124105ab58efb35fcd7820263cd6731ec Mon Sep 17 00:00:00 2001 From: Benjamin Smith Date: Sun, 21 Jul 2024 17:29:54 +0200 Subject: [PATCH] one last cheeky hack --- src/stores/middleware/persistState.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/stores/middleware/persistState.ts b/src/stores/middleware/persistState.ts index ff38979..24319e9 100644 --- a/src/stores/middleware/persistState.ts +++ b/src/stores/middleware/persistState.ts @@ -1,4 +1,4 @@ -import type { Middleware } from "@reduxjs/toolkit"; +import type { Middleware, Action } from "@reduxjs/toolkit"; import type { RootState } from "../store"; @@ -7,7 +7,7 @@ export const LS_KEY = "csv-airdrop-v1"; export const persistBookmarkState: Middleware<{}, RootState> = (store) => (next) => (action) => { const result = next(action); - const sliceType = action.type.split("/")[0]; + const sliceType = (action as Action).type.split("/")[0]; if (sliceType === "bookmarks") { const state = store.getState(); const sliceState = state["bookmarks"];