diff --git a/src/Innertube.ts b/src/Innertube.ts index 99e6f026..b4dc5bbd 100644 --- a/src/Innertube.ts +++ b/src/Innertube.ts @@ -215,7 +215,7 @@ class Innertube { async getUnseenNotificationsCount(): Promise { const response = await this.actions.execute('/notification/get_unseen_count'); // TODO: properly parse this - return response.data?.unseenCount || response.data.actions?.[0].updateNotificationsUnseenCountAction?.unseenCount; + return response.data?.unseenCount || response.data?.actions?.[0].updateNotificationsUnseenCountAction?.unseenCount || 0; } /**