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
This commit is contained in:
Thomas LÉVEIL 2022-01-06 08:48:12 +01:00 committed by GitHub
parent ec5037f30d
commit 46fa6a56fa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)}`;
}