提交 67d883c5 编写于 作者: H Hixie

We don't necessarily have a child, so debugDescribeChildren() needs to check for null.

R=abarth@chromium.org

Review URL: https://codereview.chromium.org/1151533006
上级 77ef2197
......@@ -265,7 +265,11 @@ abstract class RenderObjectWithChildMixin<ChildType extends RenderObject> {
if (_child != null)
_child.detach();
}
String debugDescribeChildren(String prefix) => '${prefix}child: ${child.toString(prefix)}';
String debugDescribeChildren(String prefix) {
if (child != null)
return '${prefix}child: ${child.toString(prefix)}';
return '';
}
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册