From 784db30614083fbc0fc557965f9bd32844941962 Mon Sep 17 00:00:00 2001 From: Simon Huber Date: Mon, 11 Mar 2019 10:37:49 +0100 Subject: [PATCH] Fix removesuffix filter when title is undefined (#3827) --- core/modules/filters/removesuffix.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/filters/removesuffix.js b/core/modules/filters/removesuffix.js index 0dac6e598..3d305aabf 100644 --- a/core/modules/filters/removesuffix.js +++ b/core/modules/filters/removesuffix.js @@ -18,7 +18,7 @@ Export our filter function exports.removesuffix = function(source,operator,options) { var results = []; source(function(tiddler,title) { - if(title.substr(-operator.operand.length) === operator.operand) { + if(title && title.substr(-operator.operand.length) === operator.operand) { results.push(title.substr(0,title.length - operator.operand.length)); } });