ded/script.js — Issue #33: loop cacheing optimization results in extra iteration(s)/error in edge case
Author: laurengarcia
Created: 2011-12-22 02:03:18+00:00
State: open

havent seen it break $script completely, but line 15 of script.js/src/script.js produces a console error if you have two different $script.ready calls, the first containing one file and the second containing two files:

function every(ar, fn, i) {
for (i = 0, j = ar.length; i < j; ++i) if (!fn(ar[i])) return f
return 1
}

the cacheing mechanism (j=ar.legnth) results in the return value being undefined. i fixed it on my end by just removing the third argument which doesnt seem to be used anyway and looping without the ar.length cacheing.