From 45c45e098fa46d103dd1c37dc70bc6a74157a5bb Mon Sep 17 00:00:00 2001 From: Jermolene Date: Sat, 25 Jan 2014 19:55:56 +0000 Subject: [PATCH] Add a cancel button to the 'set password' dialog Fixes #185 --- core/modules/startup.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/modules/startup.js b/core/modules/startup.js index 1a97e22c1..a1fe1b537 100755 --- a/core/modules/startup.js +++ b/core/modules/startup.js @@ -103,8 +103,11 @@ exports.startup = function() { serviceName: "Set a new password for this TiddlyWiki", noUserName: true, submitText: "Set password", + canCancel: true, callback: function(data) { - $tw.crypto.setPassword(data.password); + if(data) { + $tw.crypto.setPassword(data.password); + } return true; // Get rid of the password prompt } });