@codecademy/brand 0.13.50-alpha.14a36c6df8.0 → 0.13.50-alpha.27a9ce658d.0

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.
@@ -220,7 +220,7 @@ function worker() {
220
220
  });
221
221
  }
222
222
  async function processSearchAsYouType(query, queryWordSet, max) {
223
- const f = await fetch('${BASE_URL}/search-as-you-type/${search}', {
223
+ const f = await fetch('{BASE_URL}/search-as-you-type/{SEARCH}', {
224
224
  body: JSON.stringify({
225
225
  query,
226
226
  max
@@ -245,7 +245,9 @@ export function getSearchWorkerSrc() {
245
245
  search
246
246
  } = window.location;
247
247
  const BASE_URL = `${getPortalOrigin()}/api/portal/search`;
248
- return worker.toString().trim().replace('function worker() {', '').slice(-0, -1) // remove ending bracket
248
+ const fnAsStr = worker.toString().trim();
249
+ const start = fnAsStr.indexOf('{') + 1;
250
+ return fnAsStr.slice(start, -1) // remove wrapping function
249
251
  .replaceAll(' ', '') // remove indentation
250
252
  .replaceAll('{BASE_URL}', BASE_URL).replaceAll('{SEARCH}', search);
251
253
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@codecademy/brand",
3
3
  "description": "Brand component library for Codecademy",
4
- "version": "0.13.50-alpha.14a36c6df8.0",
4
+ "version": "0.13.50-alpha.27a9ce658d.0",
5
5
  "author": "Codecademy Engineering <dev@codecademy.com>",
6
6
  "dependencies": {
7
7
  "@emotion/is-prop-valid": "1.2.1",
@@ -47,5 +47,5 @@
47
47
  "dist/**/[A-Z]**/[A-Z]*.js",
48
48
  "dist/**/[A-Z]**/index.js"
49
49
  ],
50
- "gitHead": "2d5c6ea2e5669064d30388fc91d66ddf06e1ab90"
50
+ "gitHead": "690e31cb7ab070de00bdd7aa1b9fb60bb3c5c185"
51
51
  }