Add console error for heroku log.
Fix bug where there was not check on undefined metadata. Fix bug where claims from list trending are not part of a channel.
This commit is contained in:
parent
5bc4650ad1
commit
94136dbb69
2 changed files with 5 additions and 3 deletions
|
@ -260,6 +260,7 @@ export default async(data, socket) => {
|
||||||
|
|
||||||
return response.body.result[Object.keys(response.body.result)[0]];
|
return response.body.result[Object.keys(response.body.result)[0]];
|
||||||
} catch(error) {
|
} catch(error) {
|
||||||
|
console.error(error);
|
||||||
messageSlack({
|
messageSlack({
|
||||||
message: "```" + error + "```",
|
message: "```" + error + "```",
|
||||||
pretext: "_Someone is going through the Playground and the daemon is not running_",
|
pretext: "_Someone is going through the Playground and the daemon is not running_",
|
||||||
|
|
|
@ -136,9 +136,10 @@ function generateContent(exampleNumber, displayTrendingContent) {
|
||||||
Promise.all(rawContentCollection)
|
Promise.all(rawContentCollection)
|
||||||
.then(collection => {
|
.then(collection => {
|
||||||
for (const part of 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;
|
continue;
|
||||||
|
|
||||||
try {
|
try {
|
||||||
renderedContentCollection.push(`
|
renderedContentCollection.push(`
|
||||||
<section class="playground-content__trend">
|
<section class="playground-content__trend">
|
||||||
|
@ -154,7 +155,7 @@ function generateContent(exampleNumber, displayTrendingContent) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="media__subtitle">
|
<div class="media__subtitle">
|
||||||
${part.signing_channel.name || "Anon"}
|
${part.signing_channel ? part.signing_channel.name : "Anon"}
|
||||||
</div>
|
</div>
|
||||||
</section>
|
</section>
|
||||||
`);
|
`);
|
||||||
|
|
Loading…
Reference in a new issue