I’m using promises to handle to handle a modal dialog: resolved when the user press the OK button, rejected when cancelled or closed. To resolve and dismiss the modal I use this methods: And when cancel button fires this method within the modal: Everything is working fine and the modal hides, but a console error is logged with this description