From 8dbc00d577bb4872e9e99c8a6726e379a5ddf290 Mon Sep 17 00:00:00 2001 From: chenpan Date: Thu, 19 Jul 2018 20:55:33 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=BC=8F=E5=86=99=E5=BC=95=E5=8F=B7?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/taro-weapp/src/create-component.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/taro-weapp/src/create-component.js b/packages/taro-weapp/src/create-component.js index 0a744d97dcd5..547aa4f59ceb 100644 --- a/packages/taro-weapp/src/create-component.js +++ b/packages/taro-weapp/src/create-component.js @@ -54,7 +54,7 @@ function processEvent (eventHandlerName, obj) { // 普通的事件(非匿名函数),会直接call if (!isAnonymousFn) { - if (so in bindArgs && bindArgs['so'] !== 'this') { + if ('so' in bindArgs && bindArgs['so'] !== 'this') { scope = bindArgs['so'] delete bindArgs['so'] } @@ -67,7 +67,7 @@ function processEvent (eventHandlerName, obj) { } else { // 匿名函数,会将scope作为第一个参数 let _scope = null - if (so in bindArgs && bindArgs['so'] !== 'this') { + if ('so' in bindArgs && bindArgs['so'] !== 'this') { _scope = bindArgs['so'] delete bindArgs['so'] }