From 7668d9261650e33e9f6d1ee94da21bc4d2269a32 Mon Sep 17 00:00:00 2001 From: Haktrum Date: Sat, 15 Mar 2014 18:53:21 -0300 Subject: [PATCH] Fix to #154 - Group and profile pic not uploading on Firefox --- app/js/controllers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/js/controllers.js b/app/js/controllers.js index 50d3a531..fb826d37 100644 --- a/app/js/controllers.js +++ b/app/js/controllers.js @@ -949,7 +949,7 @@ angular.module('myApp.controllers', []) $scope.$watch('photo.file', onPhotoSelected); function onPhotoSelected (photo) { - if (!photo || !photo.hasOwnProperty('name')) { + if (!photo || !photo.type || photo.type.indexOf('image') !== 0) { return; } $scope.photo.updating = true; @@ -1014,7 +1014,7 @@ angular.module('myApp.controllers', []) $scope.$watch('photo.file', onPhotoSelected); function onPhotoSelected (photo) { - if (!photo || !photo.hasOwnProperty('name')) { + if (!photo || !photo.type || photo.type.indexOf('image') !== 0) { return; } $scope.photo.updating = true;