From bdc5ac592f17b5ed3bb5ae782e56ced62406d653 Mon Sep 17 00:00:00 2001 From: Jeremy Ruston Date: Thu, 9 Apr 2020 11:04:50 +0100 Subject: [PATCH] Fix count widget to return "0" for an empty filter string instead of undefined --- core/modules/widgets/count.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/modules/widgets/count.js b/core/modules/widgets/count.js index 7522a40cd..b7ee45452 100644 --- a/core/modules/widgets/count.js +++ b/core/modules/widgets/count.js @@ -45,7 +45,7 @@ CountWidget.prototype.execute = function() { if(this.filter) { this.currentCount = this.wiki.filterTiddlers(this.filter,this).length; } else { - this.currentCount = undefined; + this.currentCount = "0"; } };