Skip to content

Commit

Permalink
handle undefined profile (#489)
Browse files Browse the repository at this point in the history
  • Loading branch information
xavluiz authored Mar 18, 2024
1 parent 17a2147 commit 4cb75ee
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "swdc-vscode",
"displayName": "Code Time",
"version": "2.7.8",
"version": "2.7.9",
"publisher": "softwaredotcom",
"description": "Code Time is an open source plugin that provides programming metrics right in Visual Studio Code.",
"author": {
Expand Down
2 changes: 1 addition & 1 deletion src/notifications/endOfDay.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ export const setEndOfDayNotification = async () => {
if (!cachedUser) {
return;
}
const workHours: any = cachedUser?.profile.work_hours ? JSON.parse(cachedUser.profile.work_hours) : DEFAULT_WORK_HOURS
const workHours: any = cachedUser?.profile?.work_hours ? JSON.parse(cachedUser.profile.work_hours) : DEFAULT_WORK_HOURS

// If the end of day notification setting is turned on (if undefined or null, will default to true)
if (cachedUser?.preferences_parsed?.notifications?.endOfDayNotification) {
Expand Down
Binary file renamed swdc-vscode-2.7.8.vsix → swdc-vscode-2.7.9.vsix
Binary file not shown.

0 comments on commit 4cb75ee

Please sign in to comment.