forked from coracle/flotilla
Replace state when opening a modal from a drawer
This commit is contained in:
+2
-1
@@ -8,7 +8,8 @@ export const getKey = <T>(key: string) => state.get(key) as T | undefined
|
||||
export const popKey = <T>(key: string) => {
|
||||
const value: T | undefined = state.get(key)
|
||||
|
||||
state.delete(key)
|
||||
// Goofy hack due to sveltekit's double-rendering
|
||||
setTimeout(() => state.delete(key), 300)
|
||||
|
||||
return value
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user