فهرست منبع

Merge pull request #8057 from brianzinn/master

fix: Web Workers have no window
David Catuhe 5 سال پیش
والد
کامیت
1306551052
1فایلهای تغییر یافته به همراه1 افزوده شده و 1 حذف شده
  1. 1 1
      src/Offline/database.ts

+ 1 - 1
src/Offline/database.ts

@@ -92,7 +92,7 @@ export class Database implements IOfflineProvider {
     }
     }
 
 
     private static _ReturnFullUrlLocation = (url: string): string => {
     private static _ReturnFullUrlLocation = (url: string): string => {
-        if (url.indexOf("http:/") === -1 && url.indexOf("https:/") === -1) {
+        if (url.indexOf("http:/") === -1 && url.indexOf("https:/") === -1 && typeof window !== "undefined") {
             return (Database._ParseURL(window.location.href) + url);
             return (Database._ParseURL(window.location.href) + url);
         }
         }
         else {
         else {