You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
interchangeably. This fails with either of these errors (depending on the morph direction):
The specified value "#ff00ff" cannot be parsed, or is out of range.
The specified value "8" does not conform to the required format. The format is "#rrggbb" where rr, gg, bb are two-digit hexadecimal numbers.
Which causes the value to be set before the type, and because the value is invalid, it is blanked out and the error is shown.
Fix
According to MDN, toNode.attributes on line 4 can be in any order. Reversing the for loop direction won't fix this in all cases because the order might not be the same. This could be fixed by setting value to blank (if it differs), setting all other attributes, then setting value at the end (if it differs).
Or if we can just move value to be the last attribute in the loop, it should work.
The text was updated successfully, but these errors were encountered:
Problem
I am morphing A:
and B:
interchangeably. This fails with either of these errors (depending on the morph direction):
At this line:
morphdom/src/morphAttrs.js
Line 37 in 3482994
Cause
morphdom iterates over attrs in this line:
morphdom/src/morphAttrs.js
Line 17 in 3482994
Which causes the
value
to be set before thetype
, and because the value is invalid, it is blanked out and the error is shown.Fix
According to MDN,
toNode.attributes
on line 4 can be in any order. Reversing the for loop direction won't fix this in all cases because the order might not be the same. This could be fixed by setting value to blank (if it differs), setting all other attributes, then setting value at the end (if it differs).Or if we can just move
value
to be the last attribute in the loop, it should work.The text was updated successfully, but these errors were encountered: