aboutsummaryrefslogtreecommitdiff
path: root/src/client/react/components
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/react/components')
-rw-r--r--src/client/react/components/presentational/IconFromUserType.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/client/react/components/presentational/IconFromUserType.js b/src/client/react/components/presentational/IconFromUserType.js
index 0cb5154..43c6c2b 100644
--- a/src/client/react/components/presentational/IconFromUserType.js
+++ b/src/client/react/components/presentational/IconFromUserType.js
@@ -48,11 +48,11 @@ class IconFromUserType extends React.Component {
case 'r':
return <RoomIcon />;
default:
- if (defaultIcon) {
- return defaultIcon;
+ if (!defaultIcon) {
+ throw new Error('`userType` was invalid or not given, but `defaultIcon` is not defined.');
}
- throw new Error('`userType` was invalid or not given, but `defaultIcon` is not defined.');
+ return defaultIcon;
}
}
}