From 2b7eb9ea82e6552b6e57fddb332dfbbfa3401473 Mon Sep 17 00:00:00 2001 From: terrykingcha Date: Sat, 16 Apr 2016 00:54:18 +0800 Subject: [PATCH] * [jsfm] fix undefined for element's depth --- src/js-framework/lib/vm/compiler.js | 2 +- src/js-framework/package.json | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/js-framework/lib/vm/compiler.js b/src/js-framework/lib/vm/compiler.js index a413ec49d7..5cacb8383a 100644 --- a/src/js-framework/lib/vm/compiler.js +++ b/src/js-framework/lib/vm/compiler.js @@ -350,7 +350,7 @@ export function _checkDisplay(target, fragBlock, context) { export function _watchBlock(fragBlock, calc, type, handler) { const differ = this && this._app && this._app.differ const config = {} - const depth = fragBlock.element.depth + 1 + const depth = (fragBlock.element.depth || 0) + 1 this._watch(calc, (value) => { config.latestValue = value diff --git a/src/js-framework/package.json b/src/js-framework/package.json index 20d69fd0eb..f5460b711e 100644 --- a/src/js-framework/package.json +++ b/src/js-framework/package.json @@ -1,6 +1,6 @@ { "name": "weex-jsframework", - "version": "0.13.4", + "version": "0.13.5", "description": "JS Framework for Weex solution which is a extendable cross-platform solution for dynamic programming and publishing projects", "main": "index.js", "scripts": {