diff --git a/index.html b/index.html index 907df63e..58181485 100644 --- a/index.html +++ b/index.html @@ -240,6 +240,10 @@ if (window.location.host.endsWith('8bitworkshop.com')) {
+ - diff --git a/src/ui.ts b/src/ui.ts index 87f06998..e7886b5a 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -1708,7 +1708,12 @@ function startPlatform() { if (hasLocalStorage) { lastid = localStorage.getItem("__lastid_"+store_id); } - qs['file'] = lastid || PRESETS[0].id; + // load first preset file, unless we're in a repo + var defaultfile = lastid || (repo_id ? null : PRESETS[0].id); + qs['file'] = defaultfile || 'DEFAULT'; + if (!defaultfile) { + alertError("There is no default main file for this project. Try selecting one from the pulldown."); + } } // legacy vcs stuff if (platform_id == 'vcs' && qs['file'].startsWith('examples/') && !qs['file'].endsWith('.a')) {