Skip to content

Commit

Permalink
Fix #2316: handle absent Promise (#2317)
Browse files Browse the repository at this point in the history
  • Loading branch information
muodov committed Dec 9, 2020
1 parent e3a8fca commit ef0404e
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/sinon/fake.js
Expand Up @@ -38,7 +38,10 @@ function wrapFunc(f) {
}

function fakeClass() {
var promiseLib = Promise;
var promiseLib = null;
if (typeof Promise === "function") {
promiseLib = Promise;
}

function fake(f) {
if (arguments.length > 0 && typeof f !== "function") {
Expand Down

0 comments on commit ef0404e

Please sign in to comment.