Explorar o código

Fix to the parseURL function so it works when using hash based paths.

Daniel Eriksson %!s(int64=11) %!d(string=hai) anos
pai
achega
e47590d431
Modificáronse 1 ficheiros con 2 adicións e 1 borrados
  1. 2 1
      Babylon/Tools/babylon.database.ts

+ 2 - 1
Babylon/Tools/babylon.database.ts

@@ -30,7 +30,8 @@ module BABYLON {
         static parseURL = function(url: string) {
             var a = document.createElement('a');
             a.href = url;
-            var fileName = url.substring(url.lastIndexOf("/") + 1, url.length);
+            var urlWithoutHash = url.substring(0, url.lastIndexOf("#"));
+            var fileName = url.substring(urlWithoutHash.lastIndexOf("/") + 1, url.length);
             var absLocation = url.substring(0, url.indexOf(fileName, 0));
             return absLocation;
         }