Skip to content

Commit

Permalink
fix: keyField issue for class instances, fix #770 (#771)
Browse files Browse the repository at this point in the history
  • Loading branch information
shreymahendru authored Dec 14, 2022
1 parent 7c809ad commit 1559ca8
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export default {
id () {
if (this.vscrollData.simpleArray) return this.index
// eslint-disable-next-line no-prototype-builtins
if (this.item.hasOwnProperty(this.vscrollData.keyField)) return this.item[this.vscrollData.keyField]
if (this.vscrollData.keyField in this.item) return this.item[this.vscrollData.keyField]
throw new Error(`keyField '${this.vscrollData.keyField}' not found in your item. You should set a valid keyField prop on your Scroller`)
},
Expand Down

0 comments on commit 1559ca8

Please sign in to comment.