Fix broken style-merging behaviour
[potlatch2.git] / net / systemeD / halcyon / styleparser / Style.as
index a28ece13fb4f79e189a9172b6fda573d2185d029..f84eab711b330a534d424f8ebae069317f5e2cc1 100644 (file)
@@ -56,7 +56,7 @@ package net.systemeD.halcyon.styleparser {
                public function mergeWith(additional:Style):void {
                        for each (var prop:String in properties) {
                                // Note extra check for empty arrays, which we use to mean 'undefined' (see setPropertyFromString below)
-                               if (additional[prop] != undefined && !((additional[prop] is Array) && additional[prop].length==0)) {
+                               if (additional[prop]!=undefined && !((additional[prop] is Number) && isNaN(additional[prop])) && !((additional[prop] is Array) && additional[prop].length==0)) {
                                        this[prop]=additional[prop];
                                }
                        }