question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Use of reopen clashes with an action of the same name

See original GitHub issue

Describe the bug In our app we have a component that displays a Task (an ED model) Tasks can completed, and reopened.

In the component there is an action called reopen

@action
reopen() {
  // make PUT request...
}

There is a click handler to reopen a task.

I noticed that a PUT request was being made to reopen the task, even though I hadn’t clicked anything.

After a bit of digging, it seems that there is some confusion between my reopen action, and Ember’s Classic Object method reopen, and Ember inspectors usage of it.

To Reproduce Unsure, I tried to make a demo repo, but was unsuccessful.

Expected behavior My reopen action should not be called. (I can fix this, by renaming it reopenTask, or uninstalling the Ember inspector)

Screenshots Screenshot 2020-04-29 at 13 53 00

Environment Ember 3.16.1, Chrome 81

Additional context N/A

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:10 (8 by maintainers)

github_iconTop GitHub Comments

1reaction
amk221commented, Apr 30, 2020

That’s fine, thanks.

I guess originally I thought @action would be doing something like the old actions hash under the hood, thereby keeping is separate from the actual reopen. But, now I understand more about it. Makes sense, I’ll just rename it.

Thanks

1reaction
rwwagner90commented, Apr 29, 2020

We’ve hit some issues before where people are trying to use a built in Ember method name as their own, and I believe our stance has been to recommend against using those names in your app. Can you confirm @chancancode @rwjblue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

GitHub: Reopening a merged pull request - Stack Overflow
The answer seems to be: You can't. Once a pull request is merged and closed, it is locked forever and cannot be reopened....
Read more >
Reopen a Default Online - OATH - NYC.gov
Reopen a Default Online. You may only request a new hearing once for each summons that is in default, subject to Section 6-21(e)...
Read more >
POST modelsets/:modelSetId/clashes:reopen | Autodesk ...
Re-opens a batch of existing closed clash groups. This endpoint essentially deletes the specified closed clash groups. This operation cannot be undone, ...
Read more >
Resolve conflicts | IntelliJ IDEA Documentation - JetBrains
The conflicting file gets the Merged with conflicts status. The file remains in the same changelist in the Local Changes view, but its...
Read more >
154833 – Module name clash not detected - Bugs - Eclipse
The effect of this is that if you've checked out two different ... This creates a problem because that name is used for...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found