Commit 984435e7 by zhaochengxiang

bug fix

parent e3852c9d
...@@ -60,12 +60,21 @@ const AssetAction = (props) => { ...@@ -60,12 +60,21 @@ const AssetAction = (props) => {
} }
}) })
window?.addEventListener("storage", storageChange)
return () => { return () => {
$$assetDirectorySubject.unsubscribe() $$assetDirectorySubject.unsubscribe()
window?.removeEventListener("storage", storageChange)
} }
//eslint-disable-next-line react-hooks/exhaustive-deps //eslint-disable-next-line react-hooks/exhaustive-deps
}, [id, dirId]) }, [id, dirId])
const storageChange = (e) => {
if (e.key === 'editAssetsChange') {
getAsset()
}
}
const getAssetPaths = () => { const getAssetPaths = () => {
dispatch({ dispatch({
type: 'assetmanage.getAssetPaths', type: 'assetmanage.getAssetPaths',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment