From 086b57acd031d24f0e0f0b7b35dd87f07e7f42c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=AB=98=E8=8B=B1=E5=81=A5?= Date: Mon, 28 May 2018 18:23:41 +0800 Subject: [PATCH] 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 --- src/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.js b/src/index.js index 2fdbd22..1fa6f36 100644 --- a/src/index.js +++ b/src/index.js @@ -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 () {