-
Notifications
You must be signed in to change notification settings - Fork 1.8k
fix: Refresh model after speaker deletion #5486
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/eventyay/open-event-frontend/nnui7esny |
Codecov Report
@@ Coverage Diff @@
## development #5486 +/- ##
===============================================
- Coverage 23.25% 23.24% -0.01%
===============================================
Files 493 493
Lines 5182 5183 +1
Branches 38 38
===============================================
Hits 1205 1205
- Misses 3972 3973 +1
Partials 5 5
Continue to review full report at Codecov.
|
this.notify.error(this.l10n.t('An unexpected error has occurred.')); | ||
} | ||
this.set('isLoading', false); | ||
speaker.destroyRecord() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use async await
try { | ||
await speaker.destroyRecord(); | ||
this.notify.success(this.l10n.t('Speaker has been deleted successfully.')); | ||
this.refreshModel.bind(this)(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need for bind call. this
is literally this
already
Co-authored-by: Areeb Jamal <jamal.areeb@gmail.com>
Great. See how simple the PR became. Please add a GIF to show the change |
Sure wait a minute
…On Thu, Nov 5, 2020, 21:58 Areeb Jamal ***@***.***> wrote:
Great. See how simple the PR became. Please add a GIF to show the change
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
<#5486 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AOTTIAAW7D64AM6T2SMIUZLSOLHBDANCNFSM4TKQHVWA>
.
|
Fixes #5435
Short description of what this resolves:
Changes proposed in this pull request:
Checklist
development
branch.