fix(GUI): send an "elevation cancelled" analytics event (#1310)

If the user cancels the elevation dialog, then no event is emitted,
making it hard to track down what happened after the flash button was
pressed.

Signed-off-by: Juan Cruz Viotti <jviotti@openmailbox.org>
This commit is contained in:
Juan Cruz Viotti 2017-04-20 11:04:45 -04:00 committed by GitHub
parent 2ec2ceea14
commit 586a6950b2

View File

@ -68,6 +68,10 @@ module.exports = function(
ImageWriterService.flash(image.path, drive).then(() => {
if (flashState.wasLastFlashCancelled()) {
AnalyticsService.logEvent('Elevation cancelled', {
image,
drive
});
return;
}