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

LoaderItem urlVariables #11

Open
jesperstarkar opened this issue Oct 12, 2015 · 1 comment
Open

LoaderItem urlVariables #11

jesperstarkar opened this issue Oct 12, 2015 · 1 comment

Comments

@jesperstarkar
Copy link

Line 89: var data:URLVariables = new URLVariables( ((request.data is URLVariables) ? request.data.toString() : null) );

A problem occurs if request.data is null or an empty URLVariables object. This happens if you assign a URLVariables object to the URLRequest of the Loader(item), with no parameters passed into it.

.toString() renders an empty string which in URLVariables.decoderesults in an error thrown.

My suggestion is to keep the existing URLVariables object if present, or create a new one from parsing arbitrary data if not:
var data:URLVariables = (request.data is URLVariables) : request.data : new URLVariables(request.data.toString());

@jackdoyle
Copy link
Member

Thanks for the suggestion. Sure, we can make that change in the next push. Disclaimer: we're no longer developing LoaderMax (or any of our ActionScript tools), as our customers have largely moved to the open web and our focus is on supporting them with the JavaScript tools. Thanks again!

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

No branches or pull requests

2 participants