From 46fa6a56fa79c3ce793dcb73cd73b8be8fdfb0db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20L=C3=89VEIL?= Date: Thu, 6 Jan 2022 08:48:12 +0100 Subject: [PATCH] fix `TypeError: Cannot read property 'id' of null` when testing a Google Chat notification see https://github.com/louislam/uptime-kuma/issues/1126#issuecomment-1006343423 --- server/notification-providers/google-chat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/notification-providers/google-chat.js b/server/notification-providers/google-chat.js index 2dcd6e20..6fb32428 100644 --- a/server/notification-providers/google-chat.js +++ b/server/notification-providers/google-chat.js @@ -27,7 +27,7 @@ class GoogleChat extends NotificationProvider { textMsg += `${msg}`; const baseURL = await setting("primaryBaseURL"); - if (baseURL) { + if (baseURL && monitorJSON) { textMsg += `\n${baseURL + getMonitorRelativeURL(monitorJSON.id)}`; }