Skip to content

Commit ae5baca

Browse files
committed
Always expose window.Raven no matter what the loader is
This is problematic for many use cases, but the primary case is when window.module exists already, and someone loads raven.js from a <script> tag, the global window.Raven never exists any causes things to break and is a bit confusing.
1 parent fe66e92 commit ae5baca

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

template/_footer.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
1+
// This is being exposed no matter what because there are too many weird
2+
// usecases for how people use Raven. If this is really a problem, I'm sorry.
3+
window.Raven = Raven;
4+
15
// Expose Raven to the world
26
if (typeof define === 'function' && define.amd) {
37
// AMD
4-
window.Raven = Raven;
58
define('raven', [], function() {
69
return Raven;
710
});
@@ -11,9 +14,6 @@ if (typeof define === 'function' && define.amd) {
1114
} else if (typeof exports === 'object') {
1215
// CommonJS
1316
exports = Raven;
14-
} else {
15-
// Everything else
16-
window.Raven = Raven;
1717
}
1818

1919
})(typeof window !== 'undefined' ? window : this);

0 commit comments

Comments
 (0)