Allow Mithril to be loaded in non-browser environments without modification (#2633)

This commit is contained in:
Isiah Meadows 2020-10-14 03:12:47 -07:00 committed by GitHub
parent 3ad404039f
commit 045e4f720a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 5 additions and 4 deletions

View file

@ -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)