Skip to content

Commit e25dcc3

Browse files
committed
Fix filter not working when extra fields are ints
Fixes #376
1 parent 952138b commit e25dcc3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

InteractiveHtmlBom/web/ibom.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -272,7 +272,7 @@ function entryMatches(entry) {
272272
var f = config.fields[i];
273273
if (!settings.hiddenColumns.includes(f)) {
274274
for (var ref of entry) {
275-
if (pcbdata.bom.fields[ref[1]][i].toLowerCase().indexOf(filter) >= 0) {
275+
if (String(pcbdata.bom.fields[ref[1]][i]).toLowerCase().indexOf(filter) >= 0) {
276276
return true;
277277
}
278278
}
@@ -662,7 +662,7 @@ function populateBomBody(placeholderColumn = null, placeHolderElements = null) {
662662
td = document.createElement("TD");
663663
var output = new Array();
664664
for (let item of valueSet) {
665-
const visible = highlightFilter(item);
665+
const visible = highlightFilter(String(item));
666666
if (typeof item === 'string' && item.match(urlRegex)) {
667667
output.push(`<a href="${item}" target="_blank">${visible}</a>`);
668668
} else {

0 commit comments

Comments
 (0)