From a09e3fea15d4d28d12548110c4b8088131deea9d Mon Sep 17 00:00:00 2001 From: redhoodsu Date: Wed, 30 Oct 2024 16:33:25 +0800 Subject: [PATCH] release(toolbar): v0.6.1 --- index.json | 2 +- src/toolbar/package.json | 2 +- src/toolbar/react.tsx | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/index.json b/index.json index 2d7ed08..ed3192a 100644 --- a/index.json +++ b/index.json @@ -380,7 +380,7 @@ }, "toolbar": { "react": true, - "version": "0.6.0", + "version": "0.6.1", "style": true, "icon": false, "test": true, diff --git a/src/toolbar/package.json b/src/toolbar/package.json index e07c5ce..01d55fb 100644 --- a/src/toolbar/package.json +++ b/src/toolbar/package.json @@ -1,6 +1,6 @@ { "name": "toolbar", - "version": "0.6.0", + "version": "0.6.1", "description": "Application toolbar", "luna": { "react": true diff --git a/src/toolbar/react.tsx b/src/toolbar/react.tsx index 32b26a5..0ef357f 100644 --- a/src/toolbar/react.tsx +++ b/src/toolbar/react.tsx @@ -19,6 +19,7 @@ import Toolbar, { IButtonState, } from './index' import $ from 'licia/$' +import isUndef from 'licia/isUndef' import { useForceUpdate } from '../share/hooks' import { IComponentOptions } from '../share/Component' import { createPortal } from 'react-dom' @@ -117,7 +118,7 @@ export const LunaToolbarButton: FC> = ( }, [props.toolbar]) useEffect(() => { - if (toolbarButton.current && props.state) { + if (toolbarButton.current && !isUndef(props.state)) { toolbarButton.current.setState(props.state) } }, [props.state])