Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

fix safeCall error handling in headless mode

  • Loading branch information...
commit 29dc20ccfdae00b4b37d06ea33eaf5acf4b67abd 1 parent edbb8e1
@dfabulich authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 web/util.js
View
5 web/util.js
@@ -18,11 +18,12 @@
*/
function safeCall(obj, fn) {
- var debug = false || (typeof window != "undefined" && window.debug);
+ var isHeadless = typeof window == "undefined";
+ var debug = false || (!isHeadless && window.debug);
var userAgent = this.window && window.navigator && window.navigator.userAgent;
var isSafari = /Safari/.test(userAgent);
var isIE = /MSIE/.test(userAgent);
- if (isIE) {
+ if (isIE || isHeadless) {
// just call through; onerror will be called and debugger will handle it
if (obj) {
fn.call(obj);
Please sign in to comment.
Something went wrong with that request. Please try again.