PluginProbe
Extendify / 3.2.1
Extendify v3.2.1
3.2.1 3.2.0 3.1.6 3.1.5 3.1.4 3.1.3 3.1.2 3.1.1 3.1.0 3.0.6 3.0.5 3.0.4 trunk 0.1.0 0.10.0 0.10.1 0.10.2 0.11.0 0.11.1 0.2.0 0.3.0 0.3.1 0.4.0 0.5.0 0.6.0 All 127 releases
← All changes | src/Shared/state/unsplash-cache.js +2 -1 3.1.23.2.1 View file →
@@ -1,6 +1,7 @@
1 1 import { create } from 'zustand';
2 2 import { createJSONStorage, devtools, persist } from 'zustand/middleware';
3 +import { safeLocalStorage } from './safe-local-storage';
3 4
4 5 const ONE_WEEK_IN_MILLISECONDS = 1000 * 60 * 60 * 24 * 7;
5 6
6 7 const state = (set, get) => ({
@@ -14,7 +15,7 @@
14 15
15 16 export const useUnsplashCacheStore = create(
16 17 persist(devtools(state, { name: 'Extendify Unsplash Images' }), {
17 18 name: `extendify-unsplash-images-${window.extSharedData.siteId}`,
18 - storage: createJSONStorage(() => localStorage),
19 + storage: createJSONStorage(() => safeLocalStorage),
19 20 }),
20 21 );