MithrilJS / mithril-codemods

jscodeshift-powered mithril@0.2.x to mithril@1.x transformations
MIT License
19 stars 4 forks source link

config transform should handle more init conditional forms #12

Closed tivac closed 8 years ago

tivac commented 8 years ago

Because stuff like this is slipping through a lot.

- config : function(el, init) {
+ onupdate : function(vnode) {
  if(init) {
      return;
  }

- ctrl.form = el;
+ ctrl.form = vnode.dom;
tivac commented 8 years ago

And this:

if(init || ctrl.data.name) {
    return;
}
tivac commented 8 years ago

Working on this in https://github.com/tivac/mithril-codemods/tree/issues/12