diff --git a/lib/marked.js b/lib/marked.js index 69b0e05e8e..06987f02b0 100644 --- a/lib/marked.js +++ b/lib/marked.js @@ -1369,14 +1369,11 @@ marked.inlineLexer = InlineLexer.output; marked.parse = marked; -if (typeof module !== 'undefined' && typeof exports === 'object') { +if (module !== void 0 && typeof exports === 'object') { module.exports = marked; } else if (typeof define === 'function' && define.amd) { define(function() { return marked; }); } else { - this.marked = marked; + (this || (window !== void 0 ? window : global)).marked = marked; } - -}).call(function() { - return this || (typeof window !== 'undefined' ? window : global); -}()); +})();