@tker-react/layout 0.2.13 → 0.2.14

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.
Files changed (2) hide show
  1. package/dist/index.mjs +3 -2
  2. package/package.json +1 -1
package/dist/index.mjs CHANGED
@@ -112,14 +112,15 @@ function consumeLayoutConfig() {
112
112
  navigateAdapter: _navigateAdapter
113
113
  };
114
114
  }
115
- let _activePath = "";
115
+ let _activePath = typeof window !== "undefined" ? window.location.pathname : "";
116
116
  const _pathParamsMap = /* @__PURE__ */ new Map();
117
117
  let _activePathListeners = [];
118
118
  function setActivePath(path, fullPath) {
119
- _activePath = path;
120
119
  if (fullPath && fullPath !== path) {
121
120
  _pathParamsMap.set(path, fullPath);
122
121
  }
122
+ if (path === _activePath) return;
123
+ _activePath = path;
123
124
  _activePathListeners.forEach((l) => l());
124
125
  }
125
126
  function subscribeActivePath(listener) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tker-react/layout",
3
- "version": "0.2.13",
3
+ "version": "0.2.14",
4
4
  "private": false,
5
5
  "license": "MIT",
6
6
  "type": "module",