-
Notifications
You must be signed in to change notification settings - Fork 475
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
Uncaught TypeError - invalid input #146
Comments
Is that live somewhere? What's the input that causes this? use the debugger to break where the error is thrown to see what the passed value is. (apparently it's not a string, DOM node, URI instance, or object representing |
This is not publicly live, sorry. Should have mentioned: the error occurs even if not using any URI(), it's just included (besides jquery itself) without calling any method. |
is the jQuery plugin loaded as well? Can you please try the debugger anyway? |
closing because OP did not provide a test-case for reproduction. |
I encountered this error myself today. It occurs when setting href/src using a String object rather than a string. I noticed it when setting an image src through jQuery using a String object which works fine when using jQuery but will fail when URI.js with jQuery plugin is loaded. Easy fix is wrapping the value with String(), thus converting it to a primitive string. So why would you use String objects over primitives? Apparently jQuery calls .each() with
So it's easily possible to run into this problem without even knowing what you did wrong. See this fiddle that produces the error: http://jsfiddle.net/n3y27v2f/ |
Thank you @mdoelker! I just committed a fix, please check if that solves your problem |
Hi,
I'm getting the following messages when including uri.js:
![image](https://cloud.githubusercontent.com/assets/7429199/2817367/67968022-ced8-11e3-8508-7bc723342bde.png)
I've tried various combinations (with/without jquery, ipv6, punycode; minified, only whitespace). Same error in Chrome and IE10, maybe this issue is related to SharePoint 2013 wrapping the script files? Including jQuery or other scripts in my SharePoint page does work fine.
Regards
The text was updated successfully, but these errors were encountered: