Procházet zdrojové kódy

Fix support for relative URLs

Garrett Johnson před 3 roky
rodič
revize
185014ab57
1 změnil soubory, kde provedl 2 přidání a 1 odebrání
  1. 2 1
      src/base/TilesRendererBase.js

+ 2 - 1
src/base/TilesRendererBase.js

@@ -339,7 +339,8 @@ export class TilesRendererBase {
 				);
 
 				// remove trailing slash and last path-segment from the URL
-				const basePath = url.replace( /\/[^\/]*\/?$/, '' );
+				let basePath = url.replace( /\/[^\/]*\/?$/, '' );
+				basePath = new URL( basePath, window.location.href ).toString();
 
 				traverseSet(
 					json.root,