MithrilJS / mithril-codemods

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

Key for referenced controller not updating #25

Closed kevinkace closed 7 years ago

kevinkace commented 7 years ago

Original Source

const m = require("mithril"),
    controller = require("./controller");

module.exports = {
    controller : controller,
    view : () => m("div")
};

Tool Output

const m = require("mithril"),
    controller = require("./controller");

module.exports = {
    controller : controller,
    view : () => m("div")
};

Expected Output

const m = require("mithril"),
    controller = require("./controller");

module.exports = {
    oninit : controller,
    view : () => m("div")
};
tivac commented 7 years ago

Should be fixed in mithril-codemods@3.4.3