Merge pull request #156 from Haktrum/firefox-pic-upload-fix-154

Fix to #154 - Group and profile pic not uploading on Firefox
This commit is contained in:
Igor Zhukov 2014-03-16 14:43:56 +01:00
commit 1b6f2afc47

View File

@ -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;