chore: using includes instead of indexOf (#8261)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user