1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-06-16 10:29:54 +00:00

allbefore:include should be the identity function when applied to 1st item (#2842)

* fr-FR translation of additional error strings

* allbefore:include should be the identity function when applied to the 1st item
This commit is contained in:
Xavier Cazin 2017-06-29 19:02:33 +02:00 committed by Jeremy Ruston
parent 847727146e
commit a7b57d7f97

View File

@ -106,7 +106,7 @@ Extended filter operators to manipulate the current list.
exports.allbefore = function (source, operator) {
var results = prepare_results(source),
index = results.indexOf(operator.operand);
return (index <= 0) ? [] :
return (index < 0) ? [] :
(operator.suffix) ? results.slice(0, index + 1) :
results.slice(0, index);
};