site-config-stack 3.2.16 → 3.2.18

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.cjs CHANGED
@@ -60,13 +60,15 @@ function createSiteConfigStack(options) {
60
60
  if (typeof val !== "undefined" && val !== "")
61
61
  entry[k] = val;
62
62
  }
63
- let idx;
64
- if (Object.keys(entry).filter((k) => !k.startsWith("_")).length > 0)
65
- idx = stack.push(entry);
63
+ if (Object.keys(entry).filter((k) => !k.startsWith("_")).length === 0) {
64
+ return () => {
65
+ };
66
+ }
67
+ stack.push(entry);
66
68
  return () => {
67
- if (typeof idx !== "undefined") {
68
- stack.splice(idx - 1, 1);
69
- }
69
+ const idx = stack.indexOf(entry);
70
+ if (idx !== -1)
71
+ stack.splice(idx, 1);
70
72
  };
71
73
  }
72
74
  function get(options2) {
package/dist/index.mjs CHANGED
@@ -58,13 +58,15 @@ function createSiteConfigStack(options) {
58
58
  if (typeof val !== "undefined" && val !== "")
59
59
  entry[k] = val;
60
60
  }
61
- let idx;
62
- if (Object.keys(entry).filter((k) => !k.startsWith("_")).length > 0)
63
- idx = stack.push(entry);
61
+ if (Object.keys(entry).filter((k) => !k.startsWith("_")).length === 0) {
62
+ return () => {
63
+ };
64
+ }
65
+ stack.push(entry);
64
66
  return () => {
65
- if (typeof idx !== "undefined") {
66
- stack.splice(idx - 1, 1);
67
- }
67
+ const idx = stack.indexOf(entry);
68
+ if (idx !== -1)
69
+ stack.splice(idx, 1);
68
70
  };
69
71
  }
70
72
  function get(options2) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "site-config-stack",
3
3
  "type": "module",
4
- "version": "3.2.16",
4
+ "version": "3.2.18",
5
5
  "description": "Shared site configuration utilities.",
6
6
  "license": "MIT",
7
7
  "funding": "https://github.com/sponsors/harlan-zw",
@@ -40,10 +40,10 @@
40
40
  "vue": "^3"
41
41
  },
42
42
  "dependencies": {
43
- "ufo": "^1.6.2"
43
+ "ufo": "^1.6.3"
44
44
  },
45
45
  "devDependencies": {
46
- "vue": "^3.5.26"
46
+ "vue": "^3.5.27"
47
47
  },
48
48
  "scripts": {
49
49
  "lint": "eslint . --fix",