Explorar el Código

Fix support for relative URLs

Garrett Johnson hace 3 años
padre
commit
185014ab57
Se han modificado 1 ficheros con 2 adiciones y 1 borrados
  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,