@vishu1301/script-writing 1.2.6 → 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 +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -3
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2215,7 +2215,6 @@ function useScriptBreakdownScene(options) {
|
|
|
2215
2215
|
const [isLoading, setIsLoading] = useState(true);
|
|
2216
2216
|
const [error, setError] = useState(false);
|
|
2217
2217
|
const menuRef = useRef(null);
|
|
2218
|
-
const hasInitializedRef = useRef(false);
|
|
2219
2218
|
useEffect(() => {
|
|
2220
2219
|
setIsLoading(true);
|
|
2221
2220
|
const fetchScene = async () => {
|
|
@@ -2461,9 +2460,10 @@ function useScriptBreakdownScene(options) {
|
|
|
2461
2460
|
}, [options.preLoadedTags]);
|
|
2462
2461
|
useEffect(() => {
|
|
2463
2462
|
const doBulkCreate = async () => {
|
|
2464
|
-
if (blocks.length === 0
|
|
2463
|
+
if (blocks.length === 0) return;
|
|
2464
|
+
if (autoTaggedSceneRef.current === options.scene_url) return;
|
|
2465
2465
|
const hasPreloadedTags = options.preLoadedTags && options.preLoadedTags.length > 0;
|
|
2466
|
-
|
|
2466
|
+
autoTaggedSceneRef.current = options.scene_url;
|
|
2467
2467
|
if (hasPreloadedTags) return;
|
|
2468
2468
|
await bulkCreateTags();
|
|
2469
2469
|
};
|