|
1 | 1 | /**
|
2 |
| - * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.7 |
| 2 | + * lunr - http://lunrjs.com - A bit like Solr, but much smaller and not as bright - 2.3.8 |
3 | 3 | * Copyright (C) 2019 Oliver Nightingale
|
4 | 4 | * @license MIT
|
5 | 5 | */
|
@@ -54,7 +54,7 @@ var lunr = function (config) {
|
54 | 54 | return builder.build()
|
55 | 55 | }
|
56 | 56 |
|
57 |
| -lunr.version = "2.3.7" |
| 57 | +lunr.version = "2.3.8" |
58 | 58 | /*!
|
59 | 59 | * lunr.utils
|
60 | 60 | * Copyright (C) 2019 Oliver Nightingale
|
@@ -509,8 +509,8 @@ lunr.Pipeline.registeredFunctions = Object.create(null)
|
509 | 509 | * or mutate (or add) metadata for a given token.
|
510 | 510 | *
|
511 | 511 | * A pipeline function can indicate that the passed token should be discarded by returning
|
512 |
| - * null. This token will not be passed to any downstream pipeline functions and will not be |
513 |
| - * added to the index. |
| 512 | + * null, undefined or an empty string. This token will not be passed to any downstream pipeline |
| 513 | + * functions and will not be added to the index. |
514 | 514 | *
|
515 | 515 | * Multiple tokens can be returned by returning an array of tokens. Each token will be passed
|
516 | 516 | * to any downstream pipeline functions and all will returned tokens will be added to the index.
|
@@ -673,7 +673,7 @@ lunr.Pipeline.prototype.run = function (tokens) {
|
673 | 673 | for (var j = 0; j < tokens.length; j++) {
|
674 | 674 | var result = fn(tokens[j], j, tokens)
|
675 | 675 |
|
676 |
| - if (result === void 0 || result === '') continue |
| 676 | + if (result === null || result === void 0 || result === '') continue |
677 | 677 |
|
678 | 678 | if (Array.isArray(result)) {
|
679 | 679 | for (var k = 0; k < result.length; k++) {
|
|
0 commit comments