Skip to content

Commit

Permalink
Fix sorting of component properties in component inspector (vuejs#148)
Browse files Browse the repository at this point in the history
  • Loading branch information
markussorg authored and yyx990803 committed Nov 8, 2016
1 parent 56b6f36 commit a58c4ba
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/devtools/components/ComponentInspector.vue
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,11 @@ export default {
return this.target.id != null
},
sortedState () {
return this.target.state && this.target.state.slice().sort((a, b) => a.key > b.key)
return this.target.state && this.target.state.slice().sort((a, b) => {
if(a.key < b.key) return -1
if(a.key > b.key) return 1
return 0
})
}
},
methods: {
Expand Down

0 comments on commit a58c4ba

Please sign in to comment.