diff --git a/lib/legacy/class.html b/lib/legacy/class.html index 783322c236..e416c58314 100644 --- a/lib/legacy/class.html +++ b/lib/legacy/class.html @@ -156,6 +156,12 @@ } function mergePropertyInfo(a, b) { + if ('value' in b) { + a.value = b.value; + // ensure property value is always overridden. + } else if ('value' in a) { + delete a.value; + } if (typeof b === 'function') { a.type = b; return; @@ -163,9 +169,6 @@ if ('type' in b) { a.type = b.type; } - if ('value' in b) { - a.value = b.value; - } // readOnly: cannot become false and takes on `computed` value a.readOnly = a.readOnly || Boolean(a.computed) || b.readOnly || Boolean(b.computed); // computed: first in wins