File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -56,6 +56,10 @@ class Avatars {
5656 } ) ;
5757 }
5858
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+
5963 this . magicAvatars = new Map ( ) ;
6064
6165 if ( this . options . sigil ) {
@@ -102,7 +106,7 @@ class Avatars {
102106 type : 'magic' ,
103107 name,
104108 url,
105- } ) ) ;
109+ } ) ) . filter ( ( { url } ) => url != null ) ;
106110 }
107111
108112 async setMagicAvatar ( userID , name ) {
@@ -175,7 +179,7 @@ class Avatars {
175179 }
176180
177181 /**
178- * Use a custom avatar.
182+ * Use a custom avatar, read from a stream .
179183 */
180184 async setCustomAvatar ( userID , stream ) {
181185 const { users } = this . uw ;
You can’t perform that action at this time.
0 commit comments