Skip to content

Commit

Permalink
fix: deprecated-run-loop-and-computed-dot-access-deprecation by impor…
Browse files Browse the repository at this point in the history
…ting bind directly (#74)
  • Loading branch information
richgt committed Jan 6, 2023
1 parent 05a5c53 commit 286d891
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions addon/services/toast.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { run } from '@ember/runloop';
import { bind } from '@ember/runloop';
import Service from '@ember/service';
import { A as array } from '@ember/array';

Expand Down Expand Up @@ -32,7 +32,7 @@ export default Service.extend({
if (window && window.toastr) {
window.toastr.options =
this.config.toastrOptions || this.defaultToastrOptions;
window.toastr.options.onHidden = run.bind(this, () => {
window.toastr.options.onHidden = bind(this, () => {
let toasts = this.toasts;
let notVisible = toasts.filter((item) => !item.is(':visible'));
toasts.removeObjects(notVisible);
Expand Down

0 comments on commit 286d891

Please sign in to comment.