@onsvisual/svelte-components 1.1.27 → 1.1.29

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.
@@ -132,10 +132,12 @@
132
132
  }
133
133
 
134
134
  function highlight(text, query = "") {
135
- return text.replace(
136
- new RegExp(`\\b${query.replace(/[^\w\s]/gi, "")}`, "i"),
137
- (str) => `<b>${str}</b>`
138
- );
135
+ return typeof text === "string"
136
+ ? text.replace(
137
+ new RegExp(`\\b${query.replace(/[^\w\s]/gi, "")}`, "i"),
138
+ (str) => `<b>${str}</b>`
139
+ )
140
+ : "";
139
141
  }
140
142
 
141
143
  function suggestionTemplate(result) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@onsvisual/svelte-components",
3
- "version": "1.1.27",
3
+ "version": "1.1.29",
4
4
  "scripts": {
5
5
  "dev": "vite dev",
6
6
  "build": "npm run build:package && npm run build:docs",