Skip to content

Commit 8b6fe17

Browse files
committedFeb 13, 2025
Fix get issues
1 parent e2abd4d commit 8b6fe17

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed
 

‎tests/main/tests/helpers/reactive-context.gts

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { get } from '@ember/helper';
1+
import { helper } from '@ember/component/helper';
22
import type { TestContext } from '@ember/test-helpers';
33
import { render } from '@ember/test-helpers';
44
import Component from '@glimmer/component';
@@ -27,6 +27,10 @@ export async function reactiveContext<T extends Model>(
2727
_fields.push(field.name);
2828
});
2929

30+
const lowPolyGet = helper(([obj, prop]: [obj: TestContext, prop: string]): unknown => {
31+
return obj[prop];
32+
});
33+
3034
// eslint-disable-next-line @typescript-eslint/no-empty-object-type
3135
interface ReactiveComponent extends Record<string, string> {}
3236
class ReactiveComponent extends Component {
@@ -38,7 +42,7 @@ export async function reactiveContext<T extends Model>(
3842
<div class="reactive-context">
3943
<ul>
4044
{{#each this.__allFields as |prop|}}
41-
<li>{{prop}}: {{get this prop}}</li>
45+
<li>{{prop}}: {{lowPolyGet this prop}}</li>
4246
{{/each}}
4347
</ul>
4448
</div>

0 commit comments

Comments
 (0)