Skip to content

Commit

Permalink
fixes #105
Browse files Browse the repository at this point in the history
  • Loading branch information
Elliott Marquez committed May 1, 2017
1 parent cc4798c commit 6d8eb79
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions app-indexeddb-mirror/common-worker.html
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@
var BASE_URI = document.currentScript ? document.currentScript.baseURI : './';

// Polymer 2 baseURI polyfill for IE and Safari
if (Polymer.Element && HTMLImports.importForElement) {
if (Polymer.Element && window.HTMLImports && HTMLImports.importForElement) {
BASE_URI = HTMLImports.importForElement(document.currentScript).baseURI;
} else { // Polymer 1
BASE_URI = document._currentScript.baseURI;

// Polymer 1 or no HTML Imports
} else {
var currentScript = document._currentScript ? document._currentScript :
document.currentScript;
BASE_URI = currentScript.ownerDocument.baseURI;
}

var WORKER_SCOPE_URL =
Expand Down

0 comments on commit 6d8eb79

Please sign in to comment.