@vishu1301/script-writing 1.2.5 → 1.2.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +7 -10
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +7 -10
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2460,18 +2460,15 @@ function useScriptBreakdownScene(options) {
|
|
|
2460
2460
|
}, [options.preLoadedTags]);
|
|
2461
2461
|
useEffect(() => {
|
|
2462
2462
|
const doBulkCreate = async () => {
|
|
2463
|
-
if (blocks.length
|
|
2464
|
-
|
|
2465
|
-
|
|
2466
|
-
|
|
2467
|
-
|
|
2468
|
-
|
|
2469
|
-
autoTaggedSceneRef.current = options.scene_url;
|
|
2470
|
-
await bulkCreateTags();
|
|
2471
|
-
}
|
|
2463
|
+
if (blocks.length === 0) return;
|
|
2464
|
+
if (autoTaggedSceneRef.current === options.scene_url) return;
|
|
2465
|
+
const hasPreloadedTags = options.preLoadedTags && options.preLoadedTags.length > 0;
|
|
2466
|
+
autoTaggedSceneRef.current = options.scene_url;
|
|
2467
|
+
if (hasPreloadedTags) return;
|
|
2468
|
+
await bulkCreateTags();
|
|
2472
2469
|
};
|
|
2473
2470
|
doBulkCreate();
|
|
2474
|
-
}, [blocks, options.scene_url, options.preLoadedTags
|
|
2471
|
+
}, [blocks, options.scene_url, options.preLoadedTags]);
|
|
2475
2472
|
const clearSelection = useCallback(() => {
|
|
2476
2473
|
var _a;
|
|
2477
2474
|
setSelectionMenu(null);
|