Fix: if account is null #102

This commit is contained in:
Cutls 2019-07-25 23:55:25 +09:00
parent b12c18aa08
commit 30aee556f1

View File

@ -491,7 +491,7 @@ function parse(obj, mix, acct_id, tlid, popup, mutefilter, type) {
if (urlCont) {
urlindv = urlindv.replace(/[.*+?^=!:${}()|[\]\/\\]/g, "\\$&")
var encoded = encodeURI(urlCont[4])
var punycoded = "xn--"+punycode.encode(urlCont[2])
var punycoded = "xn--" + punycode.encode(urlCont[2])
var eUrl = urlCont[1] + "://" + punycoded + "." + urlCont[3] + "/" + encoded
var regExp = new RegExp('href="' + urlindv + '"', "g")
console.log(eUrl, regExp)
@ -915,6 +915,7 @@ function userparse(obj, auth, acct_id, tlid, popup) {
var datetype = localStorage.getItem("datetype");
Object.keys(obj).forEach(function (key) {
var toot = obj[key];
if (toot) {
console.log(["Parsing", toot])
if (!toot.username) {
var raw = toot;
@ -1028,6 +1029,8 @@ function userparse(obj, auth, acct_id, tlid, popup) {
'</div>' +
'</div>' +
'</div>';
}
});
return templete;