-
Notifications
You must be signed in to change notification settings - Fork 11
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
[BUG] Fonts cannot be applied on second page load. #12
Comments
I can't reproduce on the demo page: https://av01d.github.io/fontpicker-jquery-plugin/index.html |
I can only reproduce with the minified version from this repository. Minifying the normal version via YUI works fine. I'm not sure if GitHub is mangling it on download or what (I used wget to download directly from GitHub on my server) but the end result seems to be 200+ lines, lol. Assuming it was some weird screwup somewhere and closing. |
Believe I had exactly this issue too. Added var before fontType, also fontFamily and font in the minified version inside function getFavorites - which explain it works FIRST time when there are no favorites but gives error when there are. This code at line 5981 in the non minified version: tmp = fonts[f].split(':'), fontType = tmp[0], fontFamily = tmp[1], font = this.allFonts[fontType][fontFamily]; (sorry to comment on a closed issue, but I believe this is still an "open issue" as I just downloaded the most recent version, installed the minified code and got the error after the initial selection of a font - when there is a favorite cookie to process in getFavorites) |
Thanks for betting back to me! Yes, there was indeed an issue with some undeclared variables, which caused havoc in the minified version (due to |
The plugin works great on first page load.
However on second I get the error
fontType is not defined
.I'm not sure if this is some weird issue with caching or what.
The text was updated successfully, but these errors were encountered: