File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -47,10 +47,12 @@ export default defineNitroPlugin(async nitro => {
4747 const rootRedirect = resolveRootRedirect ( runtimeI18n . rootRedirect )
4848 const _defaultLocale : string = runtimeI18n . defaultLocale || ''
4949
50- // clear cache for i18n handlers on startup
51- const cacheStorage = useStorage ( 'cache' )
52- const cachedKeys = await cacheStorage . getKeys ( 'nitro:handlers:i18n' )
53- await Promise . all ( cachedKeys . map ( key => cacheStorage . removeItem ( key ) ) )
50+ // attempt to clear cache for i18n handlers on startup
51+ try {
52+ const cacheStorage = useStorage ( 'cache' )
53+ const cachedKeys = await cacheStorage . getKeys ( 'nitro:handlers:i18n' )
54+ await Promise . all ( cachedKeys . map ( key => cacheStorage . removeItem ( key ) ) )
55+ } catch { }
5456
5557 const detection = useI18nDetection ( undefined )
5658 const cookieOptions = {
You can’t perform that action at this time.
0 commit comments