@constructor-io/constructorio-client-javascript 2.27.12 → 2.27.13

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.
@@ -97,7 +97,9 @@ function createAutocompleteUrl(query, parameters, options) {
97
97
  var queryString = qs.stringify(queryParams, {
98
98
  indices: false
99
99
  });
100
- return "".concat(serviceUrl, "/autocomplete/").concat(encodeURIComponent(query), "?").concat(queryString);
100
+ var cleanedQuery = query.replace(/^\//, '|'); // For compatibility with backend API
101
+
102
+ return "".concat(serviceUrl, "/autocomplete/").concat(encodeURIComponent(cleanedQuery), "?").concat(queryString);
101
103
  }
102
104
  /**
103
105
  * Interface to autocomplete related API calls.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constructor-io/constructorio-client-javascript",
3
- "version": "2.27.12",
3
+ "version": "2.27.13",
4
4
  "description": "Constructor.io JavaScript client",
5
5
  "main": "lib/constructorio.js",
6
6
  "scripts": {