From 94bd9f2545bcfb7979f8ae94047e9e6a8257f6ce Mon Sep 17 00:00:00 2001 From: admls <43248857+admls@users.noreply.github.com> Date: Sat, 23 Feb 2019 18:49:43 +0000 Subject: [PATCH] Add means of halting newTiddlerEvent to hook --- core/modules/widgets/navigator.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/core/modules/widgets/navigator.js b/core/modules/widgets/navigator.js index e792341d9..9613aecfd 100755 --- a/core/modules/widgets/navigator.js +++ b/core/modules/widgets/navigator.js @@ -398,6 +398,9 @@ NavigatorWidget.prototype.handleCancelTiddlerEvent = function(event) { // If a draft of the target tiddler already exists then it is reused NavigatorWidget.prototype.handleNewTiddlerEvent = function(event) { event = $tw.hooks.invokeHook("th-new-tiddler", event); + if(!event) { + return false; + } // Get the story details var storyList = this.getStoryList(), templateTiddler, additionalFields, title, draftTitle, existingTiddler;