chore: using includes instead of indexOf (#8261)

This commit is contained in:
neverland
2021-03-04 11:07:54 +08:00
committed by GitHub
parent 831091182a
commit 9fd71923f9
13 changed files with 31 additions and 31 deletions
+1 -1
View File
@@ -34,7 +34,7 @@ const popupKeys = [
] as const;
function getIconURL(icon: string) {
if (PRESET_ICONS.indexOf(icon) !== -1) {
if (PRESET_ICONS.includes(icon)) {
return `https://img01.yzcdn.cn/vant/share-sheet-${icon}.png`;
}
return icon;