Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Global variables cause multiple instances to interfere #24

Open
SystemParadox opened this issue Jul 21, 2016 · 0 comments
Open

Global variables cause multiple instances to interfere #24

SystemParadox opened this issue Jul 21, 2016 · 0 comments

Comments

@SystemParadox
Copy link

Hi. I've been using cordova-app-loader, with the usual code:

var fs = new CordovaPromiseFS({
    Promise: Promise
});
var loader = new CordovaAppLoader({
    fs: fs,
    serverRoot: 'http://example.com/',
    localRoot: 'app',
    cacheBuster: true,
    checkTimeout: 10000
});

This works fine. However, I added another CordovaPromiseFS instance to access another part of the filesystem and it broke the app loader. Now it tries to download files to file:///app/app.js, which obviously won't work.

I ran eslint on cordova-promise-fs/index.js and it seems that the following variables are undeclared and thus global:

  • CDV_URL_ROOT
  • CDV_INTERNAL_URL_ROOT

I think this is a causing the two instances to interfere. Is there a reason for this or can it just be fixed with a couple of vars?

Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant