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

closure error #2

Open
ghost opened this issue Aug 23, 2013 · 1 comment
Open

closure error #2

ghost opened this issue Aug 23, 2013 · 1 comment

Comments

@ghost
Copy link

ghost commented Aug 23, 2013

There is an closure error in the code, if there are many css link, it may work incorrect.

for (_i = 0, _len = links.length; _i < _len; _i++) {
  i = links[_i];
  if (i.rel !== 'stylesheet') {
    continue;
  }
  innerSheetCount++;
  ajax(i.href, function(cssText) {
    var sheet, tokenlist;

    tokenlist = tokenize(cssText);
    sheet = parse(tokenlist);
    analyzeStylesheet(sheet);
    sheets[i.href] = sheet;
    outerSheetCount++;
    if (outerSheetCount === innerSheetCount) {
      window.onresize();
    }
  });
}
@saabi
Copy link
Owner

saabi commented Aug 13, 2014

Ahh, I think I see it. I have to isolate i.href.

Thanks for the report!

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