cordova-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Andrew Grieve (JIRA)" <>
Subject [jira] [Commented] (CB-5500) customised lib urls are not used when lazy loading libs
Date Thu, 28 Nov 2013 15:37:36 GMT


Andrew Grieve commented on CB-5500:

Wei - I'll just add that if lazy loading from a different remote URL is a feature that you'd
like to add, I think it would be a good contribution.

> customised lib urls are not used when lazy loading libs 
> --------------------------------------------------------
>                 Key: CB-5500
>                 URL:
>             Project: Apache Cordova
>          Issue Type: Bug
>          Components: CLI
>    Affects Versions: 3.2.0
>         Environment: All
>            Reporter: Wei Li
>            Priority: Minor
>              Labels: patch
> When creating a new cordova project using the cli tool, I specified customised uri paths
for the libs. However, when I ran the platform add command, cordova cli is not downloading
the lib from the uri I specified. It still tries to download from the default url.
> The cause of the problem is found in function
> has_custom_path
> in src/config.js file. Around this line:
> if (uri.protocol && uri.protocol[1] ==':')
> The value of protocol will be like "http:" or "https:", according to nodejs document.

> The value of uri.protocol[1] will never equal to ":", so the above statement will always
be false.
> I think the fix should be like this:
> if (uri.protocol && uri.protocol[uri.protocol.length - 1] ==':')
> make sure the protocol ends with ":".
> A pull request has created to fix this issue:

This message was sent by Atlassian JIRA

View raw message