Commit 4b1d56d2 authored by 张博's avatar 张博

fix(resource): continue to fixed bug of resource item is null

parent a02aec9e
...@@ -256,20 +256,22 @@ define(function(require, exports, module) { ...@@ -256,20 +256,22 @@ define(function(require, exports, module) {
var spaceRight = node.getStyle('space-right'); var spaceRight = node.getStyle('space-right');
var overlays = this.overlays; var overlays = this.overlays;
var resource = node.getData('resource');
var minder = node.getMinder();
var i, overlay, x;
x = 0;
for (i = 0; i < resource.length; i++) {
/* 修复 resource 数组中出现 null 的 bug /* 修复 resource 数组中出现 null 的 bug
* @Author zhangbobell * @Author zhangbobell
* @date 2016-01-15 * @date 2016-01-15
*/ */
if (!resource[i]) { var resource = node.getData("resource").filter(function(ele) {
continue; return ele !== null;
});
if (resource.length === 0) {
return;
} }
var minder = node.getMinder();
var i, overlay, x;
x = 0;
for (i = 0; i < resource.length; i++) {
x += spaceRight; x += spaceRight;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment