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

Fixes some undefined errors, and fills not always loading all the time #7

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

ctsstc
Copy link

@ctsstc ctsstc commented Apr 23, 2015

May fully fix: #6
Also fixes issue with Firefox having an undefined sheet

Sorry my IDE messed with line indents

ctsstc added 3 commits April 23, 2015 03:32
Also fixes issue with Firefox having an undefined sheet
This should now address the problems properly. Fingers Crossed.

May fully fix: nathanford#6
Also fixes issue with Firefox having an undefined sheet
Problem:
scount gets passed over into the web request and doesn't call runFills until scount == 1. The problem is that if you have multiple files being requested they will asynchronously complete at different times rather than sequentially as the code would expect to be ran when the last scount comes through. If you have styling that isn't in the first styling sheet and it's first to complete then it calls runFills which will only consist of the first sheet and not the rest. (Assuming it's collecting all the styles before checking for fills)

Fix:
Implemented a global counter that increments for each sheet and decrements when it's finished, whether it's inline or requested. Once all sheets have been collected runFills is then called.

Extra: I was going to implement a 304 check, but it seems it never fired, so I removed it.
@ctsstc ctsstc changed the title Fixes Some Undefined Errors Fixes some undefined errors, and fills not always loading all the time May 5, 2015
@ryanhovland
Copy link

This fixed undefined errors for me. This pull request should be accepted.

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

Successfully merging this pull request may close these issues.

Uncaught TypeError: Cannot read property 'match' of undefined
2 participants