This commit adds parity with iOS which does not reject the promise if dismissAllModals is called while no modals are displayed.