use the in operator lol

This commit is contained in:
Ashley 2022-12-25 16:42:08 +00:00
parent d504b848bd
commit 8446919b11

View file

@ -37,10 +37,12 @@ function getJson(str) {
} }
function checkUnexistingObject(obj) { function checkUnexistingObject(obj) {
if (Object.hasOwn(obj, "authorId")) { if (obj) {
if ("authorId" in obj) {
return true; return true;
} }
} }
}
/* /*
* Api functions * Api functions