Behave correctly in Rhino context (fixes previous commit)

redux
David Majda 14 years ago
parent 2120de36af
commit e3effab86b

@ -1,4 +1,4 @@
(function() { (function(global) {
var undefined; var undefined;
@ -34,8 +34,8 @@ PEG.GrammarError.prototype = Error.prototype;
if (typeof exports !== "undefined") { // Looks like we're in CommonJS environment. if (typeof exports !== "undefined") { // Looks like we're in CommonJS environment.
extend(exports, PEG); extend(exports, PEG);
} else { // Okay, assume this is a browser. } else { // Okay, assume this is a browser/Rhino.
window.PEG = PEG; global.PEG = PEG;
} }
})(); })(this);

Loading…
Cancel
Save