mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-28 18:29:03 +01:00
fix "TypeError: Cannot use 'in' operator to search for 'Title' in undefined"
This commit is contained in:
parent
ab1bb9bd45
commit
ecac0323b7
1 changed files with 57 additions and 52 deletions
|
@ -175,6 +175,10 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
const engagement = data.engagement;
|
const engagement = data.engagement;
|
||||||
var inv_comments = data.comments;
|
var inv_comments = data.comments;
|
||||||
const inv_vid = data.vid;
|
const inv_vid = data.vid;
|
||||||
|
//checks if json exists
|
||||||
|
|
||||||
|
if (json) {
|
||||||
|
//checks if title exists in the json object
|
||||||
|
|
||||||
if ("Title" in json) {
|
if ("Title" in json) {
|
||||||
if (!data.comments) inv_comments = "Disabled";
|
if (!data.comments) inv_comments = "Disabled";
|
||||||
|
@ -232,6 +236,7 @@ module.exports = function (app, config, renderTemplate) {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
res.redirect("/");
|
res.redirect("/");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue