From 4f4a13fadb5e5eca180fb67dfde33e2fa72bd02f Mon Sep 17 00:00:00 2001 From: Fred Chasen Date: Tue, 3 Oct 2017 17:35:53 -0700 Subject: [PATCH] Fix for URL const --- package.json | 2 +- src/utils/core.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 016ff86..ed8a5ba 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "epubjs", - "version": "0.3.54", + "version": "0.3.55", "description": "Parse and Render Epubs", "main": "lib/index.js", "module": "src/index.js", diff --git a/src/utils/core.js b/src/utils/core.js index ae4ea6e..3fee93e 100644 --- a/src/utils/core.js +++ b/src/utils/core.js @@ -3,7 +3,7 @@ const ELEMENT_NODE = 1; const TEXT_NODE = 3; const COMMENT_NODE = 8; const DOCUMENT_NODE = 9; -const _URL = URL || (typeof window != "undefined" ? (window.URL || window.webkitURL || window.mozURL) : undefined); +const _URL = typeof URL != "undefined" ? URL : (typeof window != "undefined" ? (window.URL || window.webkitURL || window.mozURL) : undefined); export function isElement(obj) { return !!(obj && obj.nodeType == 1);