@norges-domstoler/dds-components 0.0.0-dev-20231121132502 → 0.0.0-dev-20231122103304

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
@@ -7084,10 +7084,13 @@ function handleElementWithBackdropMount(container16) {
7084
7084
  }
7085
7085
  }
7086
7086
  function handleElementWithBackdropUnmount(container16) {
7087
- const scrollY = parseInt(document.body.style.top) || 0;
7087
+ const scrollY = parseInt(document.body.style.top);
7088
7088
  container16.style.removeProperty("overflow-y");
7089
7089
  container16.style.removeProperty("position");
7090
7090
  container16.style.removeProperty("top");
7091
+ if (isNaN(scrollY)) {
7092
+ return;
7093
+ }
7091
7094
  window.scrollTo(0, scrollY * -1);
7092
7095
  }
7093
7096