Don't pass Arguments object directly to Flash

This commit is contained in:
Ray Schamp 2015-05-08 20:48:53 -04:00
parent d8bd73c8bd
commit 73daea9c43

View file

@ -151,11 +151,16 @@ function sendURLtoFlash() {
* Send a URL to Flash with ASloadGithubURL, or do it when the * Send a URL to Flash with ASloadGithubURL, or do it when the
* editor is ready. * editor is ready.
*/ */
var urls = [];
for (var i = 0; i < arguments.length; i++) {
urls.push(arguments[i]);
}
if (urls.length <= 0) return;
if (Scratch.FlashApp.ASobj.ASloadGithubURL !== undefined) { if (Scratch.FlashApp.ASobj.ASloadGithubURL !== undefined) {
Scratch.FlashApp.ASobj.ASloadGithubURL(arguments); Scratch.FlashApp.ASobj.ASloadGithubURL(urls);
} else { } else {
$(document).on("editorReady", function(e) { $(document).on("editorReady", function(e) {
Scratch.FlashApp.ASobj.ASloadGithubURL(arguments); Scratch.FlashApp.ASobj.ASloadGithubURL(urls);
$(this).off(e); $(this).off(e);
}); });
} }