fix: hasOwnProperty is not a function (#294)

this.$options.methods may created by `Object.create`, so the object without a prototype can not use `hasOwnProperty` directly
This commit is contained in:
高英健
2018-05-28 18:23:41 +08:00
committed by Guillaume Chau
parent b30fb27420
commit 086b57acd0
+1 -1
View File
@@ -10,7 +10,7 @@ const keywords = [
]
function hasProperty (holder, key) {
return typeof holder !== 'undefined' && holder.hasOwnProperty(key)
return typeof holder !== 'undefined' && Object.prototype.hasOwnProperty.call(holder, key)
}
function proxyData () {