diff --git a/package.json b/package.json index b32ee29c..a800b854 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "inulajs", "description": "InulaJS is a JavaScript framework library.", - "version": "0.0.52", + "version": "0.0.54", "private": true, "scripts": { "lint": "eslint . --ext .ts --fix", diff --git a/packages/inula/package.json b/packages/inula/package.json index c22cc638..3ad86b81 100644 --- a/packages/inula/package.json +++ b/packages/inula/package.json @@ -4,7 +4,7 @@ "keywords": [ "inula" ], - "version": "0.0.52", + "version": "0.0.54", "homepage": "", "bugs": "", "main": "index.js", diff --git a/packages/inula/src/renderer/hooks/UseImperativeHook.ts b/packages/inula/src/renderer/hooks/UseImperativeHook.ts index 1871af8f..3b2b3ba1 100644 --- a/packages/inula/src/renderer/hooks/UseImperativeHook.ts +++ b/packages/inula/src/renderer/hooks/UseImperativeHook.ts @@ -19,7 +19,7 @@ import { throwNotInFuncError } from './BaseHook'; import type { Ref } from './HookType'; import { isNotNull } from '../../dom/utils/Common'; -function effectFunc(func: () => R, ref: Ref | ((any) => any) | null): (() => void) | null { +function effectFunc(func: () => R, ref: Ref | ((any) => any) | null): (() => void) | void { if (typeof ref === 'function') { const value = func(); ref(value); @@ -34,7 +34,6 @@ function effectFunc(func: () => R, ref: Ref | ((any) => any) | null): (() ref.current = null; }; } - return null; } export function useImperativeHandleImpl(