emberjs / emberjs/ember-element-helper

`ember-element-helper` doesn't work since update to `0.8.5`

Open
#117 3 comments 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
44
Forks
23
PR merge metrics
No merged PRs in 30d

Description

Helloo,

With only updating the dependencies, `ember-element-helper` is not working properly anymore. When calling it this way:
```hbs
{{#let (element (or-else @as "div")) as |Element|}}

{{yield}}

{{/let}}
```
We have this Stack Trace:
![image](https://github.com/tildeio/ember-element-helper/assets/55913724/5b4a9656-850e-4606-a916-3503f2e3ac0a)

Directing us to this assertion:
```js
export default helper(function () {
// This helper (`element`, as opposed to `-element`) mostly exists to satisfy
// things like `owner.hasRegistration('helper:element')`. The AST transform
// replaces all usages of `(element ...)` into `(component (-element ...))`
// so if this helper is invoked directly, something is wrong.

assert('The `element` helper polyfill encountered an unexpected error. ' + 'Please report the issue at http://github.com/tildeio/ember-element-helper ' + 'with the usage and conditions that caused this error.');
return null;
});
```

Here's the main dependencies versions:

```
"@embroider/compat": "3.2.3",
"@embroider/core": "3.3.0",
"@embroider/router": "2.1.4",
"@embroider/webpack": "3.2.0",
"@ember/render-modifiers": "2.1.0",
"@glimmer/component": "1.1.2",
"@glimmer/tracking": "1.1.2",
"@glint/core": "^1.2.1",
"@glint/environment-ember-loose": "^1.2.1",
"@glint/environment-ember-template-imports": "1.2.1",
"@glint/template": "^1.2.1",
"ember-auto-import": "2.6.3",
"ember-cli-babel": "8.2.0",
"ember-modifier": "4.1.0",
"ember-source": "5.3.0",
"ember-element-helper": "0.8.5",
```

As reference to this issue: https://github.com/cibernox/ember-basic-dropdown/issues/713 ; if we use `-element` it works. What am I missing here? Is there a config I need to add?
For info, I use `pnpm` and used `pnpm dedupe` - doesn't change anything.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.