aboutsummaryrefslogtreecommitdiff
path: root/src/main/assets/scripts.js
diff options
context:
space:
mode:
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);
}