emberjs / emberjs/ember.js

[Bug] fn helper does not return new function when arg changes

Open
#19,268 7 comments 1 reaction 0 assignees View on GitHub
Needs Reproduction
Dominant language
TypeScript
Stars
22.6k
Forks
4.2k
Avg merge
3d 12h
Merged PRs (30d)
15

Description

### 🐞 Describe the Bug
The `fn` helper used to return a new function when arguments change, but now it doesn't.

### 😕 🤔 Actual vs. Expected Behavior
This change in behavior happened somewhere between Ember 3.20.5 and Ember 3.22.

We noticed when using the following pattern:

```



```

Previously, `doSomething` was called when `@foo` changed. Now, it isn't called.

### 🌍 Environment

- Ember: 3.22

Contributor guide

Open the contributing guide

Research direction

Reproduce the shown {{did-update (fn this.doSomething @foo)}} pattern on Ember 3.20.5 and 3.22, then trace the fn helper behavior when @foo changes. Compare the versions to identify where the new function is no longer returned. Done means the callback runs again when the argument changes, with a regression test covering the behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.