Skip to content

Commit

Permalink
[BUGFIX] Fix @classic decorator interop
Browse files Browse the repository at this point in the history
The last fix broke interop with the @classic decorator's patch, since
we need to call its require as well.
  • Loading branch information
Chris Garrett committed Mar 25, 2020
1 parent f09c973 commit 49f5132
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions vendor/ember-decorators-polyfill/data-fix.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,14 @@
: Function.apply.call(fn, undefined, maybeDesc))
}

let originalRequire = window.require;
window.require = require = function patchDataDecorators(moduleName) {
let DS;

try {
DS = window.requirejs('ember-data').default;
DS = originalRequire('ember-data').default;
} catch (e) {
return window.requirejs(moduleName);
return originalRequire(moduleName);
}

let {
Expand Down

0 comments on commit 49f5132

Please sign in to comment.