Skip to content

Commit

Permalink
fix: remove unused line
Browse files Browse the repository at this point in the history
  • Loading branch information
logaretm committed Nov 25, 2023
1 parent b25ace4 commit 3d08d08
Showing 1 changed file with 15 additions and 19 deletions.
34 changes: 15 additions & 19 deletions packages/vee-validate/src/utils/common.ts
Original file line number Diff line number Diff line change
Expand Up @@ -362,24 +362,20 @@ export function debounceNextTick<

// https://github.com/vueuse/vueuse/blob/main/packages/shared/makeDestructurable/index.ts
export function makeDestructurable<T extends Record<string, unknown>, A extends readonly any[]>(obj: T, arr: A): T & A {
if (typeof Symbol !== 'undefined') {
const clone = { ...obj };

Object.defineProperty(clone, Symbol.iterator, {
enumerable: false,
value() {
let index = 0;
return {
next: () => ({
value: arr[index++],
done: index > arr.length,
}),
};
},
});
const clone = { ...obj };

Object.defineProperty(clone, Symbol.iterator, {
enumerable: false,
value() {
let index = 0;
return {
next: () => ({
value: arr[index++],
done: index > arr.length,
}),
};
},
});

return clone as T & A;
} else {
return Object.assign([...arr], obj) as unknown as T & A;
}
return clone as T & A;
}

0 comments on commit 3d08d08

Please sign in to comment.