From 4c551a4185f9558271ff1df4fc57f04073a067b8 Mon Sep 17 00:00:00 2001 From: * <*> Date: Tue, 1 Aug 2023 11:35:10 +0800 Subject: [PATCH] Match-id-25904dc0a270cbf44cf9f9f19e79ccd9ce7c7ddb --- package.json | 2 +- packages/inula/package.json | 2 +- packages/inula/src/renderer/hooks/UseImperativeHook.ts | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) 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(