We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d40a097 commit e29930bCopy full SHA for e29930b
src/raven.js
@@ -4,7 +4,7 @@
4
// If there is no JSON, we no-op the core features of Raven
5
// since JSON is required to encode the payload
6
var _Raven = window.Raven,
7
- hasJSON = !!(window.JSON && window.JSON.stringify),
+ hasJSON = !!(typeof JSON === 'object' && JSON.stringify),
8
lastCapturedException,
9
lastEventId,
10
globalServer,
template/_footer.js
@@ -1,9 +1,13 @@
1
// Expose Raven to the world
2
-window.Raven = Raven;
3
-
-// AMD
if (typeof define === 'function' && define.amd) {
+ // AMD
define('raven', [], function() { return Raven; });
+} else if (typeof module === 'object') {
+ // CommonJS
+ module.exports = Raven;
+} else {
+ // Everything else
+ window.Raven = Raven;
11
}
12
13
})(window);
0 commit comments