fix set initialValue
This commit is contained in:
parent
6f376af9c3
commit
080406b167
@ -13,7 +13,9 @@ export const useStoreValue = ({ computedValue, valueName }) => {
|
||||
// get value from store
|
||||
useEffect(() => {
|
||||
if (!computedValue) {
|
||||
setCurrentValue(sourceValue);
|
||||
if (sourceValue !== undefined) {
|
||||
setCurrentValue(sourceValue);
|
||||
}
|
||||
}
|
||||
}, [computedValue, sourceValue]);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user