mirror of
https://codeberg.org/ashley/poke.git
synced 2024-11-10 11:38:25 +01:00
fix "TypeError: Cannot use 'in' operator to search for 'Title' in undefined"
This commit is contained in:
parent
779e85441f
commit
469d44150e
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