Skip to content

Commit

Permalink
Merge pull request #1177 from creative-commoners/pulls/1.7/toast-cont…
Browse files Browse the repository at this point in the history
…ainer-wait-for-injector

BUG Tweak Legacy Toast Container to wait for Injector to be ready
  • Loading branch information
bergice authored Feb 8, 2021
2 parents dc1c7ce + a2b043a commit 00fd36e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion client/dist/js/bundle.js

Large diffs are not rendered by default.

8 changes: 5 additions & 3 deletions client/src/legacy/ToastsContainer.js
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,11 @@ jQuery.entwine('ss', ($) => {
((jquery) => {
jquery.extend({
noticeAdd(options) {
// Manually dispatch a redux display event
const { dispatch } = Injector.reducer.store;
dispatch(display(options));
Injector.ready(() => {
// Manually dispatch a redux display event
const { dispatch } = Injector.reducer.store;
dispatch(display(options));
});
}
});
})(jQuery);

0 comments on commit 00fd36e

Please sign in to comment.