-
-
Notifications
You must be signed in to change notification settings - Fork 926
Warn about reusing object within attrs? #2826
Copy link
Copy link
Closed
Labels
Area: CoreFor anything dealing with Mithril core itselfFor anything dealing with Mithril core itselfType: EnhancementFor any feature request or suggestion that isn't a bug fixFor any feature request or suggestion that isn't a bug fix
Metadata
Metadata
Assignees
Labels
Area: CoreFor anything dealing with Mithril core itselfFor anything dealing with Mithril core itselfType: EnhancementFor any feature request or suggestion that isn't a bug fixFor any feature request or suggestion that isn't a bug fix
Type
Projects
Status
Closed
Mithril.js version: 2.2.2
Browser and OS: Chrome, Windows 10
The following had me confused for some time:
I think the issue is that the
// does not trigger redrawversions are resuing an object withinattrsand I guess this is not allowed? If so, the problem is that (unlike when reusingattrsitself) Mithril does not give a warning for the above case. Perhaps it should? Or if this is too inefficient, maybe this could be covered more in the docs? - apologies if it is and I missed it!