Skip to content

Commit

Permalink
fix: update code with suggested edits
Browse files Browse the repository at this point in the history
  • Loading branch information
shortdiv committed Apr 27, 2018
1 parent f59c551 commit 12ac952
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions packages/test-utils/src/wrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -420,13 +420,14 @@ export default class Wrapper implements BaseWrapper {
}

Object.keys(data).forEach((key) => {
// $FlowIgnore : Problem with possibly null this.vm
if (typeof data[key] === typeof {} && data[key] !== null) {
if (typeof data[key] === 'object' && data[key] !== null) {
Object.keys(data[key]).forEach((key2) => {
var newObj = Object.assign({}, data[key], data[key][key2])
const newObj = { ...data[key], ...data[key][key2] }
// $FlowIgnore : Problem with possibly null this.vm
this.vm.$set(this.vm, [key], newObj)
})
} else {
// $FlowIgnore : Problem with possibly null this.vm
this.vm.$set(this.vm, [key], data[key])
}
})
Expand Down

0 comments on commit 12ac952

Please sign in to comment.