Match-id-25904dc0a270cbf44cf9f9f19e79ccd9ce7c7ddb
This commit is contained in:
parent
b3f6795358
commit
4c551a4185
|
@ -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",
|
||||||
|
|
|
@ -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",
|
||||||
|
|
|
@ -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>(
|
||||||
|
|
Loading…
Reference in New Issue