From 4264f0b5ab8910fd963152a2636a47e61bd88707 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Sun, 18 Jan 2009 10:27:40 +0100 Subject: [PATCH] addLabel: properly handle input canceling --- prefs.js | 4 ++++ 1 file changed, 4 insertions(+) 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;