diff --git a/lib/browser/app.js b/lib/browser/app.js index 897345c2..6e9cef30 100644 --- a/lib/browser/app.js +++ b/lib/browser/app.js @@ -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