There was an error while loading. Please reload this page.
1 parent b4a6a0b commit 6083d0eCopy full SHA for 6083d0e
1 file changed
src/lib/storage.js
@@ -63,7 +63,7 @@ class Storage extends ScratchStorage {
63
this.customAchievements = customAchievements;
64
}
65
async loadCustomAchievementData () {
66
- const accessToken = await this.loadAccessToken();
+ const accessToken = (await this.loadAccessToken()).token;
67
const customAchievements = this.customAchievements ? this.customAchievements : {};
68
return {accessToken, customAchievements};
69
@@ -95,7 +95,7 @@ class Storage extends ScratchStorage {
95
this.projectToken = creds.token;
96
this.username = creds.username;
97
// eslint-disable-next-line require-atomic-updates
98
- window.CollaborationUsername = creds.username;
+ window.CollaborationUsername = creds?.username;
99
return creds;
100
101
async getProjectToken () {
0 commit comments