refactor: Array.from(iterable).map(mapfn)をArray.from(iterable | { length: number }, mapfn)に (#11337)
* refactor: Array.from(iterable).map(mapfn)をArray.from(iterable, mapfn)に * Update packages/frontend/src/components/MkTagCloud.vue Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com> --------- Co-authored-by: Acid Chicken (硫酸鶏) <root@acid-chicken.com>
This commit is contained in:
parent
9208cfd5f3
commit
fe13755be8
4 changed files with 7 additions and 6 deletions
|
@ -540,7 +540,7 @@ function onCompositionEnd(ev: CompositionEvent) {
|
|||
}
|
||||
|
||||
async function onPaste(ev: ClipboardEvent) {
|
||||
for (const { item, i } of Array.from(ev.clipboardData.items).map((item, i) => ({ item, i }))) {
|
||||
for (const { item, i } of Array.from(ev.clipboardData.items, (item, i) => ({ item, i }))) {
|
||||
if (item.kind === 'file') {
|
||||
const file = item.getAsFile();
|
||||
const lio = file.name.lastIndexOf('.');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue