mirror of
https://github.com/scratchfoundation/scratchx.git
synced 2024-11-28 18:45:49 -05:00
Don't pass Arguments object directly to Flash
This commit is contained in:
parent
d8bd73c8bd
commit
73daea9c43
1 changed files with 7 additions and 2 deletions
|
@ -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);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue