mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-22 10:46:31 +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) => {
|
this.selectDrive = (drive) => {
|
||||||
|
if (!drive) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
this.selection.setDrive(drive);
|
this.selection.setDrive(drive);
|
||||||
|
|
||||||
AnalyticsService.logEvent('Select drive', {
|
AnalyticsService.logEvent('Select drive', {
|
||||||
|
@ -56,7 +56,7 @@ module.exports = function($uibModalInstance, DrivesModel, SelectionStateModel) {
|
|||||||
// is resolved with a non-existent drive.
|
// is resolved with a non-existent drive.
|
||||||
if (!selectedDrive || !_.includes(this.drives.getDrives(), selectedDrive)) {
|
if (!selectedDrive || !_.includes(this.drives.getDrives(), selectedDrive)) {
|
||||||
|
|
||||||
$uibModalInstance.dismiss();
|
$uibModalInstance.close();
|
||||||
} else {
|
} else {
|
||||||
$uibModalInstance.close(selectedDrive);
|
$uibModalInstance.close(selectedDrive);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user