Allow Mithril to be loaded in non-browser environments without modification (#2633)
This commit is contained in:
parent
3ad404039f
commit
045e4f720a
5 changed files with 5 additions and 4 deletions
2
route.js
2
route.js
|
|
@ -2,4 +2,4 @@
|
|||
|
||||
var mountRedraw = require("./mount-redraw")
|
||||
|
||||
module.exports = require("./api/router")(window, mountRedraw)
|
||||
module.exports = require("./api/router")(typeof window !== "undefined" ? window : null, mountRedraw)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue