null
1 parent 1ad8e5c commit 4470747Copy full SHA for 4470747
1 file changed
src/plugins/avatars.js
@@ -56,6 +56,10 @@ class Avatars {
56
});
57
}
58
59
+ if (typeof this.store === 'object' && typeof this.opts.publicPath !== 'string') {
60
+ throw new TypeError('`publicPath` is not set, but it is required because `store` is set.');
61
+ }
62
+
63
this.magicAvatars = new Map();
64
65
if (this.options.sigil) {
@@ -102,7 +106,7 @@ class Avatars {
102
106
type: 'magic',
103
107
name,
104
108
url,
105
- }));
109
+ })).filter(({ url }) => url != null);
110
111
112
async setMagicAvatar(userID, name) {
@@ -175,7 +179,7 @@ class Avatars {
175
179
176
180
177
181
/**
178
- * Use a custom avatar.
182
+ * Use a custom avatar, read from a stream.
183
*/
184
async setCustomAvatar(userID, stream) {
185
const { users } = this.uw;
0 commit comments