@datawheel/bespoke 0.4.2 → 0.4.3

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
@@ -1126,7 +1126,7 @@ function runSelector(id, logic, formatterFunctions, blockContext, replaceQuery =
1126
1126
  const fallbackValue = options && options[0] && options[0].id || options[0] || "";
1127
1127
  defaultValue = maybeFixForMulti2(fallbackValue);
1128
1128
  }
1129
- if (replaceQuery) {
1129
+ if (replaceQuery && typeof window !== "undefined") {
1130
1130
  const accesor = `selector${id}id`;
1131
1131
  const searchParams = new URLSearchParams(window.location.search);
1132
1132
  const query = Object.fromEntries(searchParams);
package/dist/server.js CHANGED
@@ -4655,7 +4655,7 @@ function runSelector(id, logic, formatterFunctions, blockContext, replaceQuery =
4655
4655
  const fallbackValue = options && options[0] && options[0].id || options[0] || "";
4656
4656
  defaultValue = maybeFixForMulti(fallbackValue);
4657
4657
  }
4658
- if (replaceQuery) {
4658
+ if (replaceQuery && typeof window !== "undefined") {
4659
4659
  const accesor = `selector${id}id`;
4660
4660
  const searchParams = new URLSearchParams(window.location.search);
4661
4661
  const query = Object.fromEntries(searchParams);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datawheel/bespoke",
3
- "version": "0.4.2",
3
+ "version": "0.4.3",
4
4
  "description": "Content management system for creating automated data reports",
5
5
  "exports": {
6
6
  ".": {
@@ -131,4 +131,4 @@
131
131
  "peerDependencies": {
132
132
  "next": "^13.4.0"
133
133
  }
134
- }
134
+ }