Repository: incubator-weex Updated Branches: refs/heads/0.16-dev 452c4d7d2 -> 5894ef6b6
* [jsfm] fix normalize method in tast center Project: http://git-wip-us.apache.org/repos/asf/incubator-weex/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-weex/commit/e3879ee7 Tree: http://git-wip-us.apache.org/repos/asf/incubator-weex/tree/e3879ee7 Diff: http://git-wip-us.apache.org/repos/asf/incubator-weex/diff/e3879ee7 Branch: refs/heads/0.16-dev Commit: e3879ee77cb1d51290241cff48164af2645bbeb9 Parents: fe8e8ed Author: Hanks <zhanghan...@gmail.com> Authored: Wed Aug 9 17:31:43 2017 +0800 Committer: Hanks <zhanghan...@gmail.com> Committed: Wed Aug 9 17:31:43 2017 +0800 ---------------------------------------------------------------------- html5/runtime/task-center.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-weex/blob/e3879ee7/html5/runtime/task-center.js ---------------------------------------------------------------------- diff --git a/html5/runtime/task-center.js b/html5/runtime/task-center.js index b2f960f..d504891 100644 --- a/html5/runtime/task-center.js +++ b/html5/runtime/task-center.js @@ -53,14 +53,12 @@ export class TaskCenter { normalize (v) { const type = typof(v) - if (v instanceof Element) { + if (v && v instanceof Element) { return v.ref } - - if (v._isVue && v.$el instanceof Element) { + if (v && v._isVue && v.$el instanceof Element) { return v.$el.ref } - if (type === 'Function') { return this.callbackManager.add(v).toString() }