Skip to content

Commit

Permalink
fix: fix CrossFadeIcon animation when icon passed as a function (#1896)
Browse files Browse the repository at this point in the history
  • Loading branch information
mMajch authored and Trancever committed May 26, 2020
1 parent 87fcb50 commit 710d364
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/components/Icon.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ const getIconId = (source: any) => {
};

export const isValidIcon = (source: any) =>
typeof source === 'string' || isImageSource(source);
typeof source === 'string' ||
typeof source === 'function' ||
isImageSource(source);

export const isEqualIcon = (a: any, b: any) =>
a === b || getIconId(a) === getIconId(b);
Expand Down

0 comments on commit 710d364

Please sign in to comment.