summaryrefslogtreecommitdiff
path: root/prefs.js
diff options
context:
space:
mode:
authorAndrew Dolgov <[email protected]>2009-01-18 10:27:40 +0100
committerAndrew Dolgov <[email protected]>2009-01-18 10:27:40 +0100
commit4264f0b5ab8910fd963152a2636a47e61bd88707 (patch)
tree6e2499cc5c2b0fd1b406ed15c7aedb2ae5c6dc51 /prefs.js
parent0e164432a4cdd1582cd2c6620dfd3bf541e26cdf (diff)
addLabel: properly handle input canceling
Diffstat (limited to 'prefs.js')
-rw-r--r--prefs.js4
1 files changed, 4 insertions, 0 deletions
diff --git a/prefs.js b/prefs.js
index d78e3b9d7..12a95249e 100644
--- a/prefs.js
+++ b/prefs.js
@@ -321,6 +321,10 @@ function addLabel() {
var caption = prompt(__("Please enter label caption:"), "");
+ if (caption == null) {
+ return false;
+ }
+
if (caption == "") {
alert(__("Can't create label: missing caption."));
return false;