]> git.wh0rd.org - tt-rss.git/commitdiff
dropbox_replace_options: only copy value when present
authorAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 9 Nov 2010 11:57:06 +0000 (14:57 +0300)
committerAndrew Dolgov <fox@madoka.volgo-balt.ru>
Tue, 9 Nov 2010 11:57:06 +0000 (14:57 +0300)
functions.js

index 09582feaf8ef03805d6c70ffdeb436822855b5ce..4942b50cd552b4b29f9c93d430ebfc7a02cae610 100644 (file)
@@ -2285,6 +2285,9 @@ function dropbox_replace_options(elem, options) {
                for (var i = 0; i < options.length; i++) {
                        var text = options[i].firstChild.nodeValue;
                        var value = options[i].getAttribute("value");
+
+                       if (value == undefined) value = text;
+
                        var issel = options[i].getAttribute("selected") == "1";
 
                        var option = new Option(text, value, issel);