diff --git a/lib/sinon/util/fake_timers.js b/lib/sinon/util/fake_timers.js index ccb9ce98b..1eedc1046 100644 --- a/lib/sinon/util/fake_timers.js +++ b/lib/sinon/util/fake_timers.js @@ -324,7 +324,7 @@ if (typeof sinon == "undefined") { return clock; }; -}(typeof global != "undefined" ? global : this)); +}(typeof global != "undefined" && typeof global !== "function" ? global : this)); sinon.timers = { setTimeout: setTimeout,