aboutsummaryrefslogtreecommitdiff
path: root/src/main/assets/scripts.js
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2022-12-22 23:50:59 +0300
committerGravatar Vitaly Takmazov2022-12-23 00:22:40 +0300
commita57278568eb10b843f76ceaa34f0b2ed36acbbb2 (patch)
tree4aab7e961c518158e0f6d1f0598ba924b4930b06 /src/main/assets/scripts.js
parent3c5cfe677e013e0bcf10d168c08ac37a93482583 (diff)
Show external followers in stats
Diffstat (limited to 'src/main/assets/scripts.js')
-rw-r--r--src/main/assets/scripts.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/main/assets/scripts.js b/src/main/assets/scripts.js
index 95ca913d..13f0cb75 100644
--- a/src/main/assets/scripts.js
+++ b/src/main/assets/scripts.js
@@ -524,6 +524,9 @@ function fetchUserUri(dataUri, callback) {
.then(json => {
users[dataUri] = json;
callback(json);
+ })
+ .catch(e => {
+ callback({ preferredUsername: dataUri });
});
}
}
@@ -731,7 +734,7 @@ ready(() => {
}
let textNode = a.childNodes[0];
if (textNode && textNode.nodeType === Node.TEXT_NODE && textNode.nodeValue && textNode.nodeValue.trim().length > 0) {
- let uname = document.createTextNode(user.preferredUsername);
+ let uname = document.createTextNode(user.preferredUsername || dataUri);
if (a.firstChild) {
a.replaceChild(uname, a.firstChild);
}