Guard dashboard against contributors that fail to load from IPFS
CI / build (16.x) (pull_request) Has been cancelled

This commit is contained in:
2026-07-25 19:06:18 +02:00
parent dbf4709512
commit c74d70040b
4 changed files with 95 additions and 4 deletions
+11 -2
View File
@@ -19,8 +19,17 @@ export default Component.extend({
src: alias('avatarURL'),
title: alias('contributor.name'),
avatarURL: computed('contributor.github_uid', 'size', function() {
const github_uid = this.contributor.github_uid;
// Re-compute whenever the contributor reference itself changes (covers a
// previously-undefined contributor being lazily loaded later), as well as
// the github_uid property when one is present.
avatarURL: computed('contributor', 'contributor.github_uid', 'size', function() {
const contributor = this.contributor;
if (!contributor) {
return '';
}
const github_uid = contributor.github_uid;
if (github_uid) {
return `https://avatars2.githubusercontent.com/u/${github_uid}?v=3&s=${SIZES[this.size]}`;