From db605ea7cac69059ac4235de999de7d857745635 Mon Sep 17 00:00:00 2001 From: John-David Dalton Date: Tue, 27 Aug 2013 21:54:03 -0700 Subject: [PATCH] Fix `basePath` in IE. Former-commit-id: 3c78a042183ffbb52c22a6979f71f842d6a1ea38 --- test/index.html | 2 +- test/underscore.html | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/index.html b/test/index.html index 78ebe8452..243a97003 100644 --- a/test/index.html +++ b/test/index.html @@ -54,7 +54,7 @@ return; } var reBasename = /[\w.-]+$/, - basePath = (location.origin + location.pathname).split(/\btest\b/).slice(0, -1).join('test'), + basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''), isModularize = /modularize/.test(ui.urlParams.build), modulePath = ui.buildPath.replace(/\.js$/, ''), moduleMain = modulePath.match(reBasename)[0]; diff --git a/test/underscore.html b/test/underscore.html index 0c6865349..0a3d7ff92 100644 --- a/test/underscore.html +++ b/test/underscore.html @@ -89,7 +89,7 @@ return; } var reBasename = /[\w.-]+$/, - basePath = (location.origin + location.pathname).split(/\btest\b/).slice(0, -1).join('test'), + basePath = ('//' + location.hostname + location.pathname).replace(/\btest\/$/, ''), modulePath = ui.buildPath.replace(/\.js$/, ''), moduleMain = modulePath.match(reBasename)[0];