Skip to content

Commit

Permalink
Make setTimeout/clearTimeout available to the template compiler s…
Browse files Browse the repository at this point in the history
…andbox

(cherry picked from commit b97ad94)
  • Loading branch information
rwjblue committed Mar 7, 2021
1 parent f0efdd2 commit fc46311
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lib/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ function getTemplateCompiler(templateCompilerPath, EmberENV = {}) {

let sandbox = {
EmberENV: clonedEmberENV,

// Older versions of ember-template-compiler (up until [email protected])
// eagerly access `setTimeout` without checking via `typeof` first
setTimeout,
clearTimeout,

// fake the module into thinking we are running inside a Node context
module: { require, exports: {} },
require,
};
Expand Down

0 comments on commit fc46311

Please sign in to comment.