1
0
mirror of https://github.com/Jermolene/TiddlyWiki5 synced 2024-11-23 10:07:19 +00:00

Remove incorrect slice parameter.

Remove incorrect slice parameter, which made the ! (not) prefix fail to return any results.
This commit is contained in:
David Johnston 2013-10-01 10:50:13 +01:00
parent ae3ed86e6f
commit d321508437

View File

@ -28,7 +28,7 @@ exports.limit = function(source,operator,options) {
// Slice the array if necessary // Slice the array if necessary
var limit = Math.min(source.length,parseInt(operator.operand,10)); var limit = Math.min(source.length,parseInt(operator.operand,10));
if(operator.prefix === "!") { if(operator.prefix === "!") {
results = source.slice(source.length - limit,limit); results = source.slice(source.length - limit);
} else { } else {
results = source.slice(0,limit); results = source.slice(0,limit);
} }