@vishu1301/script-writing 1.2.1 → 1.2.2

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 CHANGED
@@ -2447,9 +2447,14 @@ function useScriptBreakdownScene(options) {
2447
2447
  }, [options.scene_url]);
2448
2448
  react.useEffect(() => {
2449
2449
  if (options.preLoadedTags && options.preLoadedTags.length > 0) {
2450
- setTags(options.preLoadedTags);
2450
+ setTags((prev) => {
2451
+ if (JSON.stringify(prev) === JSON.stringify(options.preLoadedTags)) {
2452
+ return prev;
2453
+ }
2454
+ return options.preLoadedTags || [];
2455
+ });
2451
2456
  }
2452
- }, []);
2457
+ }, [options.preLoadedTags]);
2453
2458
  const clearSelection = react.useCallback(() => {
2454
2459
  var _a;
2455
2460
  setSelectionMenu(null);