There was an error while loading. Please reload this page.
1 parent f9e6d64 commit eaae817Copy full SHA for eaae817
1 file changed
app/components/message-box.js
@@ -40,10 +40,18 @@ export default Ember.Component.extend({
40
},
41
42
btn2Click() {
43
- if (this.btn2Callback) {
44
- this.btn2Callback();
45
- }
46
- this.close();
+ Ember.RSVP.resolve()
+ .then(() => (this.btn2Callback ? this.btn2Callback() : undefined))
+ .catch(e => {
+ if (Ember.Logger && Ember.Logger.warn) {
47
+ Ember.Logger.warn("message-box btn2Callback", e);
48
+ }
49
+ })
50
+ .then(() => {
51
+ if (!this.isDestroyed && !this.isDestroying) {
52
+ this.close();
53
54
+ });
55
56
57
closeModal() {
0 commit comments