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

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

parent a02aec9e
......@@ -256,21 +256,23 @@ define(function(require, exports, module) {
var spaceRight = node.getStyle('space-right');
var overlays = this.overlays;
var resource = node.getData('resource');
/* 修复 resource 数组中出现 null 的 bug
* @Author zhangbobell
* @date 2016-01-15
*/
var resource = node.getData("resource").filter(function(ele) {
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++) {
/* 修复 resource 数组中出现 null 的 bug
* @Author zhangbobell
* @date 2016-01-15
*/
if (!resource[i]) {
continue;
}
x += spaceRight;
overlay = overlays[i];
......
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