You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by st...@apache.org on 2016/06/03 23:46:55 UTC

cordova-lib git commit: CB-11252 Fix cordova fetch for scoped packages

Repository: cordova-lib
Updated Branches:
  refs/heads/master bebbbe78c -> 7e9f45387


CB-11252 Fix cordova fetch for scoped packages

 This closes #450


Project: http://git-wip-us.apache.org/repos/asf/cordova-lib/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-lib/commit/7e9f4538
Tree: http://git-wip-us.apache.org/repos/asf/cordova-lib/tree/7e9f4538
Diff: http://git-wip-us.apache.org/repos/asf/cordova-lib/diff/7e9f4538

Branch: refs/heads/master
Commit: 7e9f45387a1d00cdd095b0e8aa0342c92d394ce4
Parents: bebbbe7
Author: carynbear <ca...@berkeley.edu>
Authored: Fri Jun 3 14:47:09 2016 -0700
Committer: Steve Gill <st...@gmail.com>
Committed: Fri Jun 3 16:36:47 2016 -0700

----------------------------------------------------------------------
 cordova-fetch/index.js | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-lib/blob/7e9f4538/cordova-fetch/index.js
----------------------------------------------------------------------
diff --git a/cordova-fetch/index.js b/cordova-fetch/index.js
index 0e3c3fe..b5a9b66 100644
--- a/cordova-fetch/index.js
+++ b/cordova-fetch/index.js
@@ -151,7 +151,11 @@ function trimID(target) {
     //strip away everything after '@'
     if(target.indexOf('@') != -1) {
         parts = target.split('@');
-        target = parts[0];
+        if (parts.length > 2) {
+            target = '@' + parts[1];
+        } else {
+            target = parts[0];
+        }
     }        
     
     return target;


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org