Skip to content

Commit c2a2e26

Browse files
committed
This should fix the require.js plugin
1 parent 861e9f3 commit c2a2e26

File tree

2 files changed

+7
-5
lines changed

2 files changed

+7
-5
lines changed

plugins/require.js

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,11 @@
44
* Automatically wrap define/require callbacks. (Experimental)
55
*/
66
;(function(window, Raven) {
7-
"use strict";
7+
'use strict';
8+
9+
if (typeof define === 'function' && define.amd) {
10+
window.define = Raven.wrap({deep: false}, define);
11+
window.require = Raven.wrap({deep: false}, require);
12+
}
813

9-
if (typeof define === 'function' && define.amd) {
10-
window.define = Raven.wrap(define);
11-
window.require = Raven.wrap(require);
12-
}
1314
}(this, Raven));

src/raven.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ var Raven = {
207207
// Signal that this function has been wrapped already
208208
// for both debugging and to prevent it to being wrapped twice
209209
wrapped.__raven__ = true;
210+
wrapped.__inner__ = func;
210211

211212
return wrapped;
212213
},

0 commit comments

Comments
 (0)