Skip to content

Commit b34d9b6

Browse files
committed
[squash] more naming
1 parent 39d945e commit b34d9b6

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

src/core/component.ts

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,9 @@ export abstract class Component {
189189
public _getName(): string {
190190
let name;
191191

192-
if (this instanceof App) {
192+
if (this instanceof Component) {
193193
name = this._name;
194-
} else {
195-
name = Component.keyOfMatchingEntry(this, this._container);
196-
}
194+
}
197195

198196
if (name === "" && this instanceof IOPort) {
199197
name = Component.keyOfMatchingMultiport(this, this._container);
@@ -203,7 +201,7 @@ export abstract class Component {
203201
name = Component.keyOfMatchingBank(this, this._container);
204202
}
205203

206-
if (name !== "") {
204+
if (name != null && name !== "") {
207205
return name;
208206
} else {
209207
return this.constructor.name;

0 commit comments

Comments
 (0)