cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From agri...@apache.org
Subject [1/2] js commit: CB-6007 Fix findCordovaPath() not working when path contains a query param
Date Tue, 11 Feb 2014 16:06:02 GMT
Updated Branches:
  refs/heads/master e3cd6cda5 -> 799eed5f9


CB-6007 Fix findCordovaPath() not working when path contains a query param


Project: http://git-wip-us.apache.org/repos/asf/cordova-js/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-js/commit/799eed5f
Tree: http://git-wip-us.apache.org/repos/asf/cordova-js/tree/799eed5f
Diff: http://git-wip-us.apache.org/repos/asf/cordova-js/diff/799eed5f

Branch: refs/heads/master
Commit: 799eed5f90a2e332d9f90257a7b4faf29ddcebe3
Parents: d87d7d7
Author: Andrew Grieve <agrieve@chromium.org>
Authored: Tue Feb 11 11:05:27 2014 -0500
Committer: Andrew Grieve <agrieve@chromium.org>
Committed: Tue Feb 11 11:05:58 2014 -0500

----------------------------------------------------------------------
 src/common/pluginloader.js | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/799eed5f/src/common/pluginloader.js
----------------------------------------------------------------------
diff --git a/src/common/pluginloader.js b/src/common/pluginloader.js
index 07e0593..92cbaed 100644
--- a/src/common/pluginloader.js
+++ b/src/common/pluginloader.js
@@ -109,7 +109,7 @@ function findCordovaPath() {
     var scripts = document.getElementsByTagName('script');
     var term = 'cordova.js';
     for (var n = scripts.length-1; n>-1; n--) {
-        var src = scripts[n].src;
+        var src = scripts[n].src.replace(/\?.*$/, ''); // Strip any query param (CB-6007).
         if (src.indexOf(term) == (src.length - term.length)) {
             path = src.substring(0, src.length - term.length);
             break;


Mime
View raw message