Skip to content

Commit ca4ad3b

Browse files
committed
[whats-new] update ideSettings if not set before
1 parent 5431d57 commit ca4ad3b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Diff for: components/dashboard/src/WhatsNew.tsx

+2-2
Original file line numberDiff line numberDiff line change
@@ -22,13 +22,13 @@ export function WhatsNew(props: { visible: boolean, onClose: () => void }) {
2222
if (!user) {
2323
return;
2424
}
25-
const additionalData = user.additionalData || {};
25+
const additionalData = user.additionalData = user.additionalData || {};
2626
additionalData.whatsNewSeen = {
2727
...additionalData.whatsNewSeen,
2828
[news]: new Date().toISOString()
2929
}
3030
// make sure code is set as the default IDE
31-
const ideSettings = additionalData.ideSettings || {};
31+
const ideSettings = additionalData.ideSettings = additionalData.ideSettings || {};
3232
ideSettings.defaultIde = 'code';
3333
await getGitpodService().server.updateLoggedInUser({
3434
additionalData

0 commit comments

Comments
 (0)