break out when we already know the property is visible.

This commit is contained in:
Rodge Fu 2020-05-18 12:30:09 +08:00
Родитель 3a2c2fa643
Коммит 60524f0dbb
1 изменённых файлов: 3 добавлений и 1 удалений

Просмотреть файл

@ -56,8 +56,10 @@ class VisibilityCleaner {
if (visible === CliCommonSchema.CodeModel.Visibility.false) { if (visible === CliCommonSchema.CodeModel.Visibility.false) {
if (NodeHelper.HasSubClass(schema)) { if (NodeHelper.HasSubClass(schema)) {
for (let subClass of NodeHelper.getSubClasses(schema, true)) { for (let subClass of NodeHelper.getSubClasses(schema, true)) {
if (this.calcObject(subClass) === CliCommonSchema.CodeModel.Visibility.true) if (this.calcObject(subClass) === CliCommonSchema.CodeModel.Visibility.true) {
visible = CliCommonSchema.CodeModel.Visibility.true; visible = CliCommonSchema.CodeModel.Visibility.true;
break;
}
} }
} }
} }