From 85e2fe12289b59ddbbac9b81c5ad80db0da7ea79 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=2EAzer=20Ko=C3=A7ulu?= Date: Mon, 2 Feb 2015 13:19:45 -0800 Subject: [PATCH] Read document variable by checking if it exists --- resemble.js | 1 + 1 file changed, 1 insertion(+) diff --git a/resemble.js b/resemble.js index 0124c2c..e7e19dd 100644 --- a/resemble.js +++ b/resemble.js @@ -60,6 +60,7 @@ URL: https://github.com/Huddle/Resemble.js var largeImageThreshold = 1200; var httpRegex = /^https?:\/\//; + var document = typeof window != "undefined" ? window.document : {}; var documentDomainRegex = new RegExp('^https?://' + document.domain); _this['resemble'] = function( fileData ){