From 80094eb0e900d1e7e3497383eb6e776188a9c6cd Mon Sep 17 00:00:00 2001 From: Ashley Date: Mon, 19 Dec 2022 14:28:09 +0000 Subject: [PATCH] check if object is null --- src/libpoketube/libpoketube-core.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/libpoketube/libpoketube-core.js b/src/libpoketube/libpoketube-core.js index 8de4592a..80faf1cf 100644 --- a/src/libpoketube/libpoketube-core.js +++ b/src/libpoketube/libpoketube-core.js @@ -37,9 +37,13 @@ function getJson(str) { } function checkUnexistingObject(obj) { - if (obj !== undefined) { - if (obj.authorId !== undefined) { - return true; + if (obj !== null) { + if (obj.authorId !== null) { + if (obj !== undefined) { + if (obj.authorId !== undefined) { + return true; + } + } } } }