Skip to content

Commit 542112e

Browse files
lhstrhaxmmisaka
authored andcommitted
Bugfix (and made _key readonly)
1 parent d121a3e commit 542112e

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

src/core/component.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ export abstract class Component {
1818
* A symbol that identifies this component, and it also used to selectively
1919
* grant access to its privileged functions.
2020
*/
21-
protected _key = Symbol(uuidv4());
21+
protected readonly _key = Symbol(uuidv4());
2222

2323
/**
2424
* The container of this component. Each component is contained by a

src/core/reactor.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -393,10 +393,7 @@ export abstract class Reactor extends Component {
393393
}
394394
} else if (allowCreatorKey ?? false) {
395395
console.log("trying to get key......")
396-
if (this._creatorKeyChain.get(component) != null) {
397-
return this._creatorKeyChain.get(component);
398-
}
399-
return this._creatorKeyChain.get(component.getContainer());
396+
return component.getContainer()._getKey(component, this._creatorKeyChain.get(component.getContainer()));
400397
}
401398
}
402399

0 commit comments

Comments
 (0)