Skip to content

Commit

Permalink
Check existence of getIconSrc via typeof (#2592)
Browse files Browse the repository at this point in the history
  • Loading branch information
alansemenov committed May 24, 2022
1 parent d7ffcda commit 2224495
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ export class ItemStatisticsHeader
private createIconEl(item: ViewItem) {
let iconEl: Element;

if (item.getIconSrc && item.getIconSrc()) {
if (typeof item.getIconSrc === 'function' && item.getIconSrc()) {
iconEl = new ImgEl(item.getIconSrc());
} else if (item.getIconUrl()) {
let size = this.getIconSize(item);
Expand Down

0 comments on commit 2224495

Please sign in to comment.