Match-id-25904dc0a270cbf44cf9f9f19e79ccd9ce7c7ddb
This commit is contained in:
parent
b3f6795358
commit
4c551a4185
|
@ -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",
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
"keywords": [
|
||||
"inula"
|
||||
],
|
||||
"version": "0.0.52",
|
||||
"version": "0.0.54",
|
||||
"homepage": "",
|
||||
"bugs": "",
|
||||
"main": "index.js",
|
||||
|
|
|
@ -19,7 +19,7 @@ import { throwNotInFuncError } from './BaseHook';
|
|||
import type { Ref } from './HookType';
|
||||
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') {
|
||||
const value = func();
|
||||
ref(value);
|
||||
|
@ -34,7 +34,6 @@ function effectFunc<R>(func: () => R, ref: Ref<R> | ((any) => any) | null): (()
|
|||
ref.current = null;
|
||||
};
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
export function useImperativeHandleImpl<R>(
|
||||
|
|
Loading…
Reference in New Issue