Merge pull request #294 from lbryio/fix_some_bugs

Fixed some bugs
This commit is contained in:
Niko 2019-09-02 04:44:07 +02:00 committed by GitHub
commit ee65417441
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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>
`);