@wipco/sdui 0.50.4 → 0.50.5
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 +2 -0
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -2846,6 +2846,7 @@ function SduiRenderer({
|
|
|
2846
2846
|
const [state, setState] = useState(() => ({ ...initialState ?? {} }));
|
|
2847
2847
|
const urlSeeded = useRef(false);
|
|
2848
2848
|
const urlSeedPending = useRef(null);
|
|
2849
|
+
const urlHomePath = useRef(typeof window !== "undefined" ? window.location.pathname : "");
|
|
2849
2850
|
const [toasts, setToasts] = useState([]);
|
|
2850
2851
|
const toastSeq = useRef(0);
|
|
2851
2852
|
const toastTimers = useRef([]);
|
|
@@ -2887,6 +2888,7 @@ function SduiRenderer({
|
|
|
2887
2888
|
}, [page.urlState, setEntries, syncUrlState]);
|
|
2888
2889
|
useEffect(() => {
|
|
2889
2890
|
if (!syncUrlState || !page.urlState?.length || !urlSeeded.current || typeof window === "undefined") return;
|
|
2891
|
+
if (window.location.pathname !== urlHomePath.current) return;
|
|
2890
2892
|
if (urlSeedPending.current) {
|
|
2891
2893
|
const seeded = urlSeedPending.current;
|
|
2892
2894
|
if (!Object.keys(seeded).every((key) => Object.is(state[key], seeded[key]))) return;
|