Coder Social home page Coder Social logo

Comments (3)

gamtiq avatar gamtiq commented on June 22, 2024

I have created a small application that demonstrates the problem. You can see double loading in "Net" tab in Firebug or in console in Firebug/Chrome. The application can be downloaded using the following URL:
http://www.mediafire.com/file/mth9d9owmb32d35/curl-js-file-double-loading-bug.zip

from curl.

unscriptable avatar unscriptable commented on June 22, 2024

Thanks for discovering this, gamtiq!

The solution for this is to add the normalize() method to the js! plugin.
This method allows the js! plugin to determine the uniqueness of a
resource id.

Do you need a work-around for now or can you continue to work for a few
days without this fixed?

Regards,

-- John

On Mon, Nov 7, 2011 at 3:06 AM, gamtiq <
[email protected]>wrote:

Hello,

First of all I would like to thank you for the great loader. It is very
useful.
I found a bug in curl.js that leads to problems when a JS file is used as
a dependency with and without !order option. Namely, if one module depends
on "someFile.js" and another module depends on "someFile.js!order", then
this situation causes double loading of "someFile.js". As a result some
strange and difficult to find bugs can occur in an application. The problem
has its roots in the following part of fetchDep function (lines 541 and
542 in curl.js):

name = prefix + '!' + resName;
normalizedDef = cache[name];

As you can see there is no test for options in "resName".

Best regards.


Reply to this email directly or view it on GitHub:
https://github.com/unscriptable/curl/issues/30

from curl.

gamtiq avatar gamtiq commented on June 22, 2024

No, I don’t need immediate fix for this issue because I have already found and implemented a work-around in my application.

from curl.

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.