diff --git a/core/core.js b/core/core.js index d2385e34..0a9344c2 100644 --- a/core/core.js +++ b/core/core.js @@ -237,11 +237,13 @@ async function getProcessBlob(blobId, key, options) { process.task.setImports(imports); process.task.activate(); let source = await getBlobOrContent(blobId); + var appSourceName = blobId; var appSource = utf8Decode(source); try { var app = JSON.parse(appSource); if (app.type == "tildefriends-app") { - var id = app.files["app.js"]; + appSourceName = 'app.js'; + var id = app.files[appSourceName]; var blob = await getBlobOrContent(id); appSource = utf8Decode(blob); await Promise.all(Object.keys(app.files).map(async function(f) { @@ -256,7 +258,7 @@ async function getProcessBlob(blobId, key, options) { if (process.app) { process.app.send({action: "ready"}); } - await process.task.execute({name: blobId, source: appSource}); + await process.task.execute({name: appSourceName, source: appSource}); } catch (error) { if (process.app) { process.app.send({action: 'error', error: error});