Skip to content

Commit 4bf1a29

Browse files
authored
Merge pull request #14897 from emberjs/rwjblue-patch-1
[BUGFIX beta] Avoid reading from `this` in constructor.
2 parents d5364f9 + 487af3f commit 4bf1a29

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/ember-glimmer/lib/helpers/component.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,8 +148,10 @@ export class ClosureComponentReference extends CachedReference {
148148

149149
constructor(args, symbolTable, env) {
150150
super();
151-
this.defRef = args.positional.at(0);
152-
this.tag = this.defRef.tag;
151+
152+
let firstArg = args.positional.at(0);
153+
this.defRef = firstArg;
154+
this.tag = firstArg.tag;
153155
this.env = env;
154156
this.symbolTable = symbolTable;
155157
this.args = args;

0 commit comments

Comments
 (0)