emberjs / emberjs/ember.js

[Bug] A yielded 'fn' from a component is incorrectly rendered as [object Object]

Open
#20,589 8 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

### 🐞 Describe the Bug

A yielded 'fn' from a component is incorrectly rendered as [object Object]

### 🔬 Minimal Reproduction

Inside a component I have this
```
{{yield
(hash
resourceExtruderCurrentTemperature=(fn ExtruderCurrentTemperature this.printerManager)
)
}}
```

I use the 'fn' helper to be able to add more positional arguments

### 😕 Actual Behavior
This renders `[object Object]`
```

{{e.resourceExtruderCurrentTemperature true}}

```

### 🤔 Expected Behavior

Should render `3.5`
```

{{e.resourceExtruderCurrentTemperature true}}

```

### 🌍 Environment

ember-cli: 5.4.0
node: 18.18.0
os: darwin arm64
browser: chrome

### ➕ Additional Context

Using the let helper does render the expected output.

```

{{#let (e.resourceExtruderCurrentTemperature true) as |value|}}{{value}}{{/let}}

```

@NullVoxPopuli suggested this might be a bug in 'fn', hence this report.

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.