Repository: cordova-js
Updated Branches:
  refs/heads/master bbfeb7305 -> 26e3e49e4


CB-6764 Fix findCordovaPath() detecting "notcordova.js" as cordova.js


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

Branch: refs/heads/master
Commit: 26e3e49e49b2fb61ca836572af85c7a776ea9f1c
Parents: bbfeb73
Author: Andrew Grieve <[email protected]>
Authored: Tue Jul 22 10:03:08 2014 -0400
Committer: Andrew Grieve <[email protected]>
Committed: Tue Jul 22 10:03:08 2014 -0400

----------------------------------------------------------------------
 src/common/pluginloader.js | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-js/blob/26e3e49e/src/common/pluginloader.js
----------------------------------------------------------------------
diff --git a/src/common/pluginloader.js b/src/common/pluginloader.js
index f72bfda..f2d34e0 100644
--- a/src/common/pluginloader.js
+++ b/src/common/pluginloader.js
@@ -99,11 +99,11 @@ function handlePluginsObject(path, moduleList, 
finishPluginLoading) {
 function findCordovaPath() {
     var path = null;
     var scripts = document.getElementsByTagName('script');
-    var term = 'cordova.js';
+    var term = '/cordova.js';
     for (var n = scripts.length-1; n>-1; n--) {
         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);
+            path = src.substring(0, src.length - term.length) + '/';
             break;
         }
     }

Reply via email to