Skip to content

Commit f6e8cbe

Browse files
committed
Fix ReferenceErrors since we can't qualify with window
btw, this is the worst language. Fixes #287
1 parent 5390681 commit f6e8cbe

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/raven.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
// If there is no JSON, we no-op the core features of Raven
55
// since JSON is required to encode the payload
66
var _Raven = window.Raven,
7-
hasJSON = !!(isObject(JSON) && JSON.stringify),
7+
hasJSON = !!(typeof JSON === 'object' && JSON.stringify),
88
lastCapturedException,
99
lastEventId,
1010
globalServer,

template/_footer.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ if (typeof define === 'function' && define.amd) {
44
define('raven', function(Raven) {
55
return (window.Raven = Raven);
66
});
7-
} else if (isObject(module)) {
7+
} else if (typeof module === 'object') {
88
// browserify
99
module.exports = Raven;
10-
} else if (isObject(exports)) {
10+
} else if (typeof exports === 'object') {
1111
// CommonJS
1212
exports = Raven;
1313
} else {

0 commit comments

Comments
 (0)