@planningcenter/topbar 12.2.0-rc.1 → 12.2.0-rc.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.
@@ -4592,8 +4592,10 @@ true;
4592
4592
  type: "IFRAME_LOAD_ERROR"
4593
4593
  });
4594
4594
  }, [onMessage]);
4595
+ const reportLoadErrorRef = React.useRef(reportLoadError);
4596
+ reportLoadErrorRef.current = reportLoadError;
4595
4597
  React.useEffect(function armLoadTimeoutOnMount() {
4596
- const timeout = setTimeout(reportLoadError, LOAD_TIMEOUT_MS);
4598
+ const timeout = setTimeout(() => reportLoadErrorRef.current(), LOAD_TIMEOUT_MS);
4597
4599
  loadTimeoutRef.current = timeout;
4598
4600
  return () => clearTimeout(timeout);
4599
4601
  }, []);