Skip to content

Commit

Permalink
fix(getitemvalue): improve comparison to null and undefined
Browse files Browse the repository at this point in the history
fix #199
  • Loading branch information
iliyaZelenko committed Sep 18, 2019
1 parent 59e9af4 commit a53dfe4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions gh-pages-src/pages/dev/Example6.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
>
</v-flex>
<v-flex xs6>
{{ selected }}
<!--
<cool-select
v-model="selected"
Expand Down
3 changes: 2 additions & 1 deletion src/component.vue
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,8 @@ export default {
return item
},
getItemValue (item) {
if (!item) return null
// if null or undefined
if (item == null) return null
if (this.itemValue) return item[this.itemValue]
if (isObject(item)) {
Expand Down

0 comments on commit a53dfe4

Please sign in to comment.