mirror of
https://github.com/balena-io/etcher.git
synced 2025-04-24 07:17:18 +00:00
minifix(GUI): use close() to dismiss drive selector modal (#550)
Using `dismiss()` causes the promise to be rejected, with no reason in this case. Given we made sure we were handling errors from dialogs in a previous commit, this issue manifested itself. The `close()` function, without arguments, makes more sense in this case. See: https://github.com/resin-io/etcher/pull/548 Signed-off-by: Juan Cruz Viotti <jviottidc@gmail.com>
This commit is contained in:
parent
5e1ee62840
commit
c425632e27
@ -214,6 +214,10 @@ app.controller('AppController', function(
|
||||
};
|
||||
|
||||
this.selectDrive = (drive) => {
|
||||
if (!drive) {
|
||||
return;
|
||||
}
|
||||
|
||||
this.selection.setDrive(drive);
|
||||
|
||||
AnalyticsService.logEvent('Select drive', {
|
||||
|
@ -56,7 +56,7 @@ module.exports = function($uibModalInstance, DrivesModel, SelectionStateModel) {
|
||||
// is resolved with a non-existent drive.
|
||||
if (!selectedDrive || !_.includes(this.drives.getDrives(), selectedDrive)) {
|
||||
|
||||
$uibModalInstance.dismiss();
|
||||
$uibModalInstance.close();
|
||||
} else {
|
||||
$uibModalInstance.close(selectedDrive);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user