mirror of
https://github.com/balena-io/etcher.git
synced 2025-07-19 09:16:38 +00:00
Avoid analytics and logging if dialog resolves no file
This will be the case when the dialog accepts zip files. If the selected zip image is invalid, the module will display an error and resolve `undefined`.
This commit is contained in:
parent
e5ddb2f2cb
commit
3e352d4224
@ -128,6 +128,13 @@ app.controller('AppController', function(
|
||||
|
||||
this.selectImage = function() {
|
||||
return $q.when(dialog.selectImage()).then(function(image) {
|
||||
|
||||
// Avoid analytics and selection state changes
|
||||
// if no file was resolved from the dialog.
|
||||
if (!image) {
|
||||
return;
|
||||
}
|
||||
|
||||
self.selection.setImage(image);
|
||||
AnalyticsService.logEvent('Select image', {
|
||||
image: image
|
||||
|
Loading…
x
Reference in New Issue
Block a user