Match-id-25904dc0a270cbf44cf9f9f19e79ccd9ce7c7ddb

This commit is contained in:
* 2023-08-01 11:35:10 +08:00
parent b3f6795358
commit 4c551a4185
3 changed files with 3 additions and 4 deletions

View File

@ -1,7 +1,7 @@
{ {
"name": "inulajs", "name": "inulajs",
"description": "InulaJS is a JavaScript framework library.", "description": "InulaJS is a JavaScript framework library.",
"version": "0.0.52", "version": "0.0.54",
"private": true, "private": true,
"scripts": { "scripts": {
"lint": "eslint . --ext .ts --fix", "lint": "eslint . --ext .ts --fix",

View File

@ -4,7 +4,7 @@
"keywords": [ "keywords": [
"inula" "inula"
], ],
"version": "0.0.52", "version": "0.0.54",
"homepage": "", "homepage": "",
"bugs": "", "bugs": "",
"main": "index.js", "main": "index.js",

View File

@ -19,7 +19,7 @@ import { throwNotInFuncError } from './BaseHook';
import type { Ref } from './HookType'; import type { Ref } from './HookType';
import { isNotNull } from '../../dom/utils/Common'; import { isNotNull } from '../../dom/utils/Common';
function effectFunc<R>(func: () => R, ref: Ref<R> | ((any) => any) | null): (() => void) | null { function effectFunc<R>(func: () => R, ref: Ref<R> | ((any) => any) | null): (() => void) | void {
if (typeof ref === 'function') { if (typeof ref === 'function') {
const value = func(); const value = func();
ref(value); ref(value);
@ -34,7 +34,6 @@ function effectFunc<R>(func: () => R, ref: Ref<R> | ((any) => any) | null): (()
ref.current = null; ref.current = null;
}; };
} }
return null;
} }
export function useImperativeHandleImpl<R>( export function useImperativeHandleImpl<R>(