react-router-dom-v5-compat 0.0.0-experimental-bcda00aaf → 0.0.0-experimental-3be88c6fb

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
@@ -1,5 +1,5 @@
1
1
  /**
2
- * React Router DOM v5 Compat v0.0.0-experimental-bcda00aaf
2
+ * React Router DOM v5 Compat v0.0.0-experimental-3be88c6fb
3
3
  *
4
4
  * Copyright (c) Remix Software Inc.
5
5
  *
@@ -1125,9 +1125,13 @@ function useFormAction(action, _temp2) {
1125
1125
  // since it might not apply to our contextual route. We add it back based
1126
1126
  // on match.route.index below
1127
1127
  let params = new URLSearchParams(path.search);
1128
- if (params.has("index") && params.get("index") === "") {
1128
+ let indexValues = params.getAll("index");
1129
+ let hasNakedIndexParam = indexValues.some(v => v === "");
1130
+ if (hasNakedIndexParam) {
1129
1131
  params.delete("index");
1130
- path.search = params.toString() ? "?" + params.toString() : "";
1132
+ indexValues.filter(v => v).forEach(v => params.append("index", v));
1133
+ let qs = params.toString();
1134
+ path.search = qs ? "?" + qs : "";
1131
1135
  }
1132
1136
  }
1133
1137
  if ((!action || action === ".") && match.route.index) {