Git Product home page Git Product logo

Comments (11)

amorey avatar amorey commented on May 18, 2024 1

@Sharl212 @Swapnilchavan18 Based on your description of the problem I think the issue might be that each call to componentWillMount() defines a LoadJS bundle but LoadJS throws an error when you try to reuse a previously used bundle name. Here's an example that highlights this condition:
https://jsfiddle.net/muicss/2d9ryjfp/

In your code, are you defining a bundle name when you call loadjs()?

from loadjs.

amorey avatar amorey commented on May 18, 2024

What's the error you're getting? Also, which OS/Browser are you using?

from loadjs.

Swapnilchavan18 avatar Swapnilchavan18 commented on May 18, 2024

I am using chrome/windows 10, file loads on first load but when navigated back to same route where I am loading file, I get error "Uncaught (in promise) LoadJS" and js file does not load.
I think it happens because file has to load from cache.

from loadjs.

amorey avatar amorey commented on May 18, 2024

Can you share code to re-create the error on JSFiddle or CodePen? By "navigating back" do you mean hitting the back button?

from loadjs.

Swapnilchavan18 avatar Swapnilchavan18 commented on May 18, 2024

Its single page application , I mean without refresh.

from loadjs.

amorey avatar amorey commented on May 18, 2024

Can you share code to reproduce the error? Does the fuploader.js file matter or are you getting the same error with other files?

I need more information to be able to debug the problem or recommend a work-around.

from loadjs.

Swapnilchavan18 avatar Swapnilchavan18 commented on May 18, 2024

Is there anything that I have to do in componentWillUnmount to load files when there is not a refresh between pages i.e for single page app

from loadjs.

amorey avatar amorey commented on May 18, 2024

from loadjs.

Swapnilchavan18 avatar Swapnilchavan18 commented on May 18, 2024

ok Thanks . give me some time, I am using that in my personal project, I will create fiddle

from loadjs.

SharlSherif avatar SharlSherif commented on May 18, 2024

got the same exact error when loading js files on componentWillMount, it works the first time the component mounts after remounting again , it throws Uncaught (in promise) LoadJS --- asyncToGenerator.js:6 in the console.
the asyncToGenerator.js :

  try {
    var info = gen[key](arg);
    var value = info.value;
  } catch (error) {
    reject(error); // error is thrown by this 
    return;
  }

  if (info.done) {
    resolve(value);
  } else {
    Promise.resolve(value).then(_next, _throw);
  }
}

from loadjs.

amorey avatar amorey commented on May 18, 2024

@Sharl212 Thanks for letting us know. Can you share some example code that reproduces the problem?

from loadjs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.