MithrilJS / mithril-codemods

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

Event cancelling needs to create a param #18

Closed tivac closed 8 years ago

tivac commented 8 years ago
m("div", {
    onclick : function() {
        m.redraw.strategy("none");
    }
});

will be rewritten as

m("div", {
    onclick : function() {
        e.redraw = false;
    }
});

which is good, except e is now undefined and the code will break. Will need to add a param if there isn't one.