()
| 25 | |
| 26 | /** Retrieves a `isRestoring` from Svelte's context */ |
| 27 | export const getIsRestoringContext = (): Box<boolean> => { |
| 28 | try { |
| 29 | const isRestoring = getContext<Box<boolean> | undefined>( |
| 30 | _isRestoringContextKey, |
| 31 | ) |
| 32 | return isRestoring ?? { current: false } |
| 33 | } catch (error) { |
| 34 | return { current: false } |
| 35 | } |
| 36 | } |
| 37 | |
| 38 | /** Sets a `isRestoring` on Svelte's context */ |
| 39 | export const setIsRestoringContext = (isRestoring: Box<boolean>): void => { |
no outgoing calls
no test coverage detected