We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 673dec6 commit 6f8316fCopy full SHA for 6f8316f
src/shared/util.js
@@ -170,8 +170,8 @@ export function isPlainObject (obj: any): boolean {
170
* Merge an Array of Objects into a single Object.
171
*/
172
export function toObject (arr: Array<any>): Object {
173
- const res = arr[0] || {}
174
- for (let i = 1; i < arr.length; i++) {
+ const res = {}
+ for (let i = 0; i < arr.length; i++) {
175
if (arr[i]) {
176
extend(res, arr[i])
177
}
0 commit comments