修复:避免访问空id

pull/1132/MERGE
ChenX 4 years ago
parent 68048dcbab
commit b34ce62f57

@ -59,7 +59,7 @@ export function GetDeepestTemplate(brs: Entity[]): TemplateRecord | undefined
if (br.Template && br.Template.Object) if (br.Template && br.Template.Object)
{ {
let template = br.Template.Object as TemplateRecord; let template = br.Template.Object as TemplateRecord;
if (template.NodeDepth > maxDepth) if (template && template.NodeDepth > maxDepth)
{ {
maxDepth = template.NodeDepth; maxDepth = template.NodeDepth;
deepestTemplate = template; deepestTemplate = template;

Loading…
Cancel
Save