瀏覽代碼

fix: add support for functional component type icons

master
Bettenbuk Zoltan 6 年之前
父節點
當前提交
f5dba929a5
共有 1 個檔案被更改,包括 1 行新增1 行删除
  1. 1
    1
      react/features/base/avatar/components/AbstractStatelessAvatar.js

+ 1
- 1
react/features/base/avatar/components/AbstractStatelessAvatar.js 查看文件

@@ -42,6 +42,6 @@ export default class AbstractStatelessAvatar<P: Props> extends PureComponent<P>
42 42
      * @returns {boolean}
43 43
      */
44 44
     _isIcon(iconProp: ?string | ?Object): boolean {
45
-        return Boolean(iconProp) && typeof iconProp === 'object';
45
+        return Boolean(iconProp) && (typeof iconProp === 'object' || typeof iconProp === 'function');
46 46
     }
47 47
 }

Loading…
取消
儲存