Merge pull request #45 from almindor/crash-fix

do not crash on status: null
This commit is contained in:
Dusko Angirevic 2020-04-16 00:49:42 +02:00 committed by GitHub
commit 33d54bdda8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -150,8 +150,8 @@ function parseNotification(data){
switch (item['type']){ switch (item['type']){
case "mention": case "mention":
if (!data.status) { if (!data.status) {
break; break;
} }
item = parseToot(data.status) item = parseToot(data.status)
item['typeIcon'] = "image://theme/icon-s-retweet" item['typeIcon'] = "image://theme/icon-s-retweet"
@ -160,8 +160,8 @@ function parseNotification(data){
break; break;
case "reblog": case "reblog":
if (!data.status) { if (!data.status) {
break; break;
} }
item = parseToot(data.status) item = parseToot(data.status)
item = parseAccounts(item, "reblog_", data["account"]) item = parseAccounts(item, "reblog_", data["account"])