The expression in the if statement seems buggy. It seems that it will happily update a <div> with configuration for a <span> just because both are Element. Instead, we should add bool RenderNode.canUpdateFrom(Node config) and let the render node decide if it's compatible with the configuration object.
The expression in the if statement seems buggy. It seems that it will happily update a
<div>
with configuration for a<span>
just because both areElement
. Instead, we should addbool RenderNode.canUpdateFrom(Node config)
and let the render node decide if it's compatible with the configuration object.Another piece of code with the same issue: https://github.com/yjbanov/butterfly/blob/73914a4cda32d2c7f593da743ef424a62d6d2baa/lib/src/node.dart#L36