yjbanov/butterfly

Buggy heuristics when deciding between update and replace child

Opened this issue · 0 comments

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.

Another piece of code with the same issue:

bool _canUpdate(RenderNode node, Node configuration) {