File tree Expand file tree Collapse file tree 1 file changed +2
-0
lines changed
packages/hooks/src/useCookieState Expand file tree Collapse file tree 1 file changed +2
-0
lines changed Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ function useCookieState(cookieKey: string, options: UseCookieStateOptions = {})
15
15
if ( typeof cookieValue === 'string' ) return cookieValue
16
16
17
17
if ( isFunction ( options . defaultValue ) ) {
18
+ // @ts -ignore
18
19
return options . defaultValue ( )
19
20
}
20
21
return options . defaultValue
@@ -28,6 +29,7 @@ function useCookieState(cookieKey: string, options: UseCookieStateOptions = {})
28
29
// eslint-disable-next-line no-unused-vars
29
30
const { defaultValue, ...restOptions } = { ...options , ...newOptions }
30
31
const getValue = ( ) => {
32
+ // @ts -ignore
31
33
const value = isFunction ( newValue ) ? newValue ( state . value ) : newValue
32
34
if ( value === undefined ) {
33
35
Cookies . remove ( cookieKey )
You can’t perform that action at this time.
0 commit comments