]> git.wh0rd.org - tt-rss.git/commitdiff
addLabel: properly handle input canceling
authorAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 09:27:40 +0000 (10:27 +0100)
committerAndrew Dolgov <fox@bah.spb.su>
Sun, 18 Jan 2009 09:27:40 +0000 (10:27 +0100)
prefs.js

index d78e3b9d77a3bbe251eda68df6a424c2fc238d2e..12a95249e935433ec047ab07656ba67c4da0eae0 100644 (file)
--- 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;