Skip to content

Commit

Permalink
Bugfix (and made _key readonly)
Browse files Browse the repository at this point in the history
  • Loading branch information
lhstrh authored and axmmisaka committed Aug 20, 2023
1 parent e046b40 commit 7413e83
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/core/component.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export abstract class Component {
* A symbol that identifies this component, and it also used to selectively
* grant access to its privileged functions.
*/
protected _key = Symbol(uuidv4());
protected readonly _key = Symbol(uuidv4());

/**
* The container of this component. Each component is contained by a
Expand Down
5 changes: 1 addition & 4 deletions src/core/reactor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,10 +393,7 @@ export abstract class Reactor extends Component {
}
} else if (allowCreatorKey ?? false) {
console.log("trying to get key......")
if (this._creatorKeyChain.get(component) != null) {
return this._creatorKeyChain.get(component);
}
return this._creatorKeyChain.get(component.getContainer());
return component.getContainer()._getKey(component, this._creatorKeyChain.get(component.getContainer()));
}
}

Expand Down

0 comments on commit 7413e83

Please sign in to comment.