Skip to content

Commit

Permalink
Merge pull request #568 from plural/deckbuilder-sets-search
Browse files Browse the repository at this point in the history
Make pack filter exact, not-partial match.
  • Loading branch information
plural authored Dec 14, 2021
2 parents 438239e + 72eb2b7 commit 6326e0f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion web/js/nrdb.smart_filter.js
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,8 @@
}
function add_string_sf(key, operator, values) {
for (var j = 0; j < values.length; j++) {
values[j] = new RegExp(values[j], 'i');
// Do exact matches for packs
values[j] = key == 'pack_code' ? new RegExp('^(' + values[j] + ')$', 'i') : new RegExp(values[j], 'i');
}
switch (operator) {
case ":":
Expand Down

0 comments on commit 6326e0f

Please sign in to comment.