1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2024-05-28 08:41:30 +00:00

fixed bug when importing github project on first IDE run

This commit is contained in:
Steven Hugg 2022-02-03 18:52:20 -06:00
parent 4076b742fe
commit 8b23e9872e

View File

@ -2372,13 +2372,6 @@ function setPlatformUI() {
}
export function getPlatformAndRepo() {
// add default platform?
// TODO: do this after repo_id
platform_id = qs.platform || userPrefs.getLastPlatformID();
if (!platform_id) {
if (isEmbed) fatalError(`The 'platform' must be specified when embed=1`);
platform_id = qs.platform = "vcs";
}
// lookup repository for this platform
repo_id = qs.repo || userPrefs.getLastRepoID();
if (hasLocalStorage && repo_id && repo_id !== '/') {
@ -2392,9 +2385,15 @@ export function getPlatformAndRepo() {
requestPersistPermission(true, true);
}
} else {
platform_id = qs.platform || userPrefs.getLastPlatformID();
repo_id = '';
delete qs.repo;
}
// add default platform
if (!platform_id) {
if (isEmbed) fatalError(`The 'platform' must be specified when embed=1`);
platform_id = qs.platform = "vcs";
}
}
// start