sunpeak 0.16.9 → 0.16.10

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.
@@ -7564,9 +7564,11 @@ function IframeResource({
7564
7564
  const hostRef = React.useRef(null);
7565
7565
  const [loaded, setLoaded] = React.useState(false);
7566
7566
  const resourceUrl = src ?? scriptSrc;
7567
- React.useEffect(() => {
7568
- setLoaded(false);
7569
- }, [resourceUrl]);
7567
+ const prevResourceUrl = React.useRef(resourceUrl);
7568
+ if (prevResourceUrl.current !== resourceUrl) {
7569
+ prevResourceUrl.current = resourceUrl;
7570
+ if (loaded) setLoaded(false);
7571
+ }
7570
7572
  const hasReceivedSizeRef = React.useRef(false);
7571
7573
  const displayModeRef = React.useRef(hostContext?.displayMode);
7572
7574
  displayModeRef.current = hostContext?.displayMode;
@@ -8791,4 +8793,4 @@ exports.getRegisteredHosts = getRegisteredHosts;
8791
8793
  exports.registerHostShell = registerHostShell;
8792
8794
  exports.useSimulatorState = useSimulatorState;
8793
8795
  exports.useThemeContext = useThemeContext;
8794
- //# sourceMappingURL=simulator-DYM74GCT.cjs.map
8796
+ //# sourceMappingURL=simulator-yk9BZ7Vl.cjs.map