-
Notifications
You must be signed in to change notification settings - Fork 754
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
Loading saveSort widget with jQuery 1.9 throws a JSON parse error #244
Comments
Hi jorisw! I think this might be the same as issue #240. I'll have it updated soon.
Thanks! Update: LOL, nevermind, those are the correct line numbers in the unminified version :p |
Ok, this should be fixed now. Please verify it for me! |
I get a different error now:
Please don't mind the filenames, they are not minified files but they do hold the .min suffix in their filename. |
Sorry, I can't seem to duplicate this problem... I updated this demo page locally to use jQuery 1.9.1 and included the migrate plugin (v.1.1.1) and I get no errors. Everything seems to save, load and sort properly.
Actually, try clearing out your local storage, then reload the page.
|
I've disabled my other scripts except the one that calls the tableSorter plug-in. When the saveSort widget kicks in, it tries to parse as JSON what is empty, see line 77 of tablesorter.widgets.js. Apparently, in Chrome, this yields the unexpected end error, as it tries to parse ''. Changing line 77 to this: v = localStorage[key] ? $.parseJSON(localStorage[key]) : {}; … fixed the problem for me. |
Hi Joris! Ahh, you're right. I'll change the code to this in the next update (only because it's shorter :P) v = $.parseJSON(localStorage[key] || '{}'); |
Hi,
When loading the saveSort widget, I get the following uncaught SyntaxError in Chrome:
Uncaught SyntaxError: Unexpected token u - jquery-1.9.0.min.js:1
st.extend.parseJSON - jquery-1.9.0.min.js:1
$.tablesorter.storage - jquery.tablesorter.widgets.min.js:77
$.tablesorter.addWidget.format - jquery.tablesorter.widgets.min.js:1004
$.tablesorter.addWidget.init - jquery.tablesorter.widgets.min.js:981
Any ideas? TIA
The text was updated successfully, but these errors were encountered: