diff --git a/app/soapbox/actions/instance.js b/app/soapbox/actions/instance.js
index 85d8b2a3f..b1df09d64 100644
--- a/app/soapbox/actions/instance.js
+++ b/app/soapbox/actions/instance.js
@@ -61,6 +61,7 @@ export function fetchInstance() {
dispatch(fetchNodeinfo()); // Pleroma < 2.1 backwards compatibility
}
}).catch(error => {
+ console.error(error);
dispatch({ type: INSTANCE_FETCH_FAIL, error, skipAlert: true });
});
};
diff --git a/app/soapbox/components/avatar.js b/app/soapbox/components/avatar.js
index 1bbca72cc..d0df7959b 100644
--- a/app/soapbox/components/avatar.js
+++ b/app/soapbox/components/avatar.js
@@ -28,14 +28,22 @@ export default class Avatar extends React.PureComponent {
height: `${size}px`,
};
- return (
-
- );
+ // Only render the image if src is provided
+ if (account.get('avatar')) {
+ return (
+
+ );
+ } else {
+ // Fall back on rendering an empty div
+ return (
+
+ );
+ }
}
}
diff --git a/app/soapbox/utils/features.js b/app/soapbox/utils/features.js
index 6df42d1e7..e55ca455c 100644
--- a/app/soapbox/utils/features.js
+++ b/app/soapbox/utils/features.js
@@ -89,9 +89,20 @@ export const getFeatures = createSelector([
export const parseVersion = version => {
const regex = /^([\w\.]*)(?: \(compatible; ([\w]*) (.*)\))?$/;
const match = regex.exec(version);
- return {
- software: match[2] || MASTODON,
- version: match[3] || match[1],
- compatVersion: match[1],
- };
+
+ if (match) {
+ return {
+ software: match[2] || MASTODON,
+ version: match[3] || match[1],
+ compatVersion: match[1],
+ };
+ } else {
+ // If we can't parse the version, this is a new and exotic backend.
+ // Fall back to minimal featureset.
+ return {
+ software: null,
+ version: '0.0.0',
+ compatVersion: '0.0.0',
+ };
+ }
};