fix drop down freeze bug
authorDave Stubbs <osm@randomjunk.co.uk>
Wed, 9 Sep 2009 16:57:08 +0000 (16:57 +0000)
committerDave Stubbs <osm@randomjunk.co.uk>
Wed, 9 Sep 2009 16:57:08 +0000 (16:57 +0000)
net/systemeD/potlatch2/mapfeatures/editors/ChoiceEditorFactory.as

index 8b308c5..b6846a7 100644 (file)
@@ -13,10 +13,10 @@ package net.systemeD.potlatch2.mapfeatures.editors {
             choices = [];
             for each( var choiceXML:XML in inputXML.choice ) {
                 var choice:Object = {};
-                choice["value"] = choiceXML.@value;
-                choice["description"] = choiceXML.@description;
-                choice["label"] = choiceXML.@text;
-                choice["icon"] = choiceXML.@icon;
+                choice["value"] = String(choiceXML.@value);
+                choice["description"] = String(choiceXML.@description);
+                choice["label"] = String(choiceXML.@text);
+                choice["icon"] = choiceXML.hasOwnProperty("@icon") ? String(choiceXML.@icon) : null;
                 choices.push(choice);
             }
         }