From a87e0b7c0e2a3c89f241bc19efe6cf4f7ca70ff9 Mon Sep 17 00:00:00 2001 From: "aiden.ahn" Date: Fri, 13 Jan 2017 16:12:56 +0900 Subject: [PATCH] Fix bug with isStandardBrowserEnv (#597) --- lib/utils.js | 2 +- test/specs/requests.spec.js | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/utils.js b/lib/utils.js index aef5fa1192..7ad5bf70e0 100644 --- a/lib/utils.js +++ b/lib/utils.js @@ -181,7 +181,7 @@ function isStandardBrowserEnv() { return ( typeof window !== 'undefined' && typeof document !== 'undefined' && - typeof document.createElement === 'function' + typeof document.createElement !== 'undefined' ); } diff --git a/test/specs/requests.spec.js b/test/specs/requests.spec.js index f8cd032732..49a97a3602 100644 --- a/test/specs/requests.spec.js +++ b/test/specs/requests.spec.js @@ -51,6 +51,7 @@ describe('requests', function () { expect(reason.config.method).toBe('get'); expect(reason.config.url).toBe('http://thisisnotaserver'); + jasmine.Ajax.install(); done(); };