@rkosafo/cai.components 0.0.63 → 0.0.64

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.
@@ -1,3 +1,4 @@
1
+ import { browser } from '$app/environment';
1
2
  const defaultConfig = {
2
3
  headerOffset: 200,
3
4
  footerOffset: 70,
@@ -19,7 +20,7 @@ export function createTableHeightStore(config = {}) {
19
20
  height = calculateTableHeight(config);
20
21
  };
21
22
  // Initialize and set up resize listener
22
- if (typeof window !== 'undefined') {
23
+ if (browser) {
23
24
  window.addEventListener('resize', updateHeight);
24
25
  }
25
26
  return {
@@ -28,7 +29,7 @@ export function createTableHeightStore(config = {}) {
28
29
  },
29
30
  update: updateHeight,
30
31
  dispose: () => {
31
- if (typeof window !== 'undefined') {
32
+ if (browser) {
32
33
  window.removeEventListener('resize', updateHeight);
33
34
  }
34
35
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rkosafo/cai.components",
3
- "version": "0.0.63",
3
+ "version": "0.0.64",
4
4
  "files": [
5
5
  "dist",
6
6
  "!dist/**/*.test.*",