Fixed some bugs #294

Merged
tiger5226 merged 1 commit from fix_some_bugs into master 2019-09-02 04:44:08 +02:00
2 changed files with 5 additions and 3 deletions

View file

@ -260,6 +260,7 @@ export default async(data, socket) => {
return response.body.result[Object.keys(response.body.result)[0]];
} catch(error) {
console.error(error);
messageSlack({
message: "```" + error + "```",
pretext: "_Someone is going through the Playground and the daemon is not running_",

View file

@ -136,9 +136,10 @@ function generateContent(exampleNumber, displayTrendingContent) {
Promise.all(rawContentCollection)
.then(collection => {
for (const part of collection) {
if (part.value.tags && part.value.tags.includes("mature"))
if (part && part.value.tags && part.value.tags.includes("mature"))
continue;
if (part === undefined)
continue;
try {
renderedContentCollection.push(`
<section class="playground-content__trend">
@ -154,7 +155,7 @@ function generateContent(exampleNumber, displayTrendingContent) {
</div>
<div class="media__subtitle">
${part.signing_channel.name || "Anon"}
${part.signing_channel ? part.signing_channel.name : "Anon"}
</div>
</section>
`);