@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.js CHANGED
@@ -2422,9 +2422,14 @@ function useScriptBreakdownScene(options) {
2422
2422
  }, [options.scene_url]);
2423
2423
  useEffect(() => {
2424
2424
  if (options.preLoadedTags && options.preLoadedTags.length > 0) {
2425
- setTags(options.preLoadedTags);
2425
+ setTags((prev) => {
2426
+ if (JSON.stringify(prev) === JSON.stringify(options.preLoadedTags)) {
2427
+ return prev;
2428
+ }
2429
+ return options.preLoadedTags || [];
2430
+ });
2426
2431
  }
2427
- }, []);
2432
+ }, [options.preLoadedTags]);
2428
2433
  const clearSelection = useCallback(() => {
2429
2434
  var _a;
2430
2435
  setSelectionMenu(null);