Skip to content

Commit

Permalink
fix init logic
Browse files Browse the repository at this point in the history
  • Loading branch information
James Spencer authored and ulfryk committed Sep 18, 2018
1 parent 4f4a7d7 commit 5f888cc
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/monet.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,12 @@
if (typeof define === 'function' && define.amd) {
define(factory)
} else if (typeof module === 'object' && module.exports) {
try{
if (!window) {
throw new Error('window missing use root instead')
}
module.exports = factory(window)
}
catch(e) {
module.exports = factory(root)
}
module.exports = factory(root)
} else {
root.notUseMonetGlobalObject = !root.useMonetGlobalObject
root.Monet = factory(root)
}
}(this, function (rootGlobalObject) {
}(typeof self !== 'undefined' ? self : this, function (rootGlobalObject) {
'use strict'

var root = {}
Expand Down

0 comments on commit 5f888cc

Please sign in to comment.