Fixed the release date picker when no date is chosen.

This commit is contained in:
Peter Deltchev 2016-02-15 13:10:44 -08:00
parent 093f7ffb9d
commit 3ffa8dd07a

View file

@ -100,10 +100,10 @@ angular.module('ponyfm').directive 'pfmTrackEditor', () ->
if typeof(value) == 'object' if typeof(value) == 'object'
formData.append name, value, value.name formData.append name, value, value.name
if name == 'released_at' and value != null if name == 'released_at' and value? and value != ''
formData.append name, value.toISOString() formData.append name, value.toISOString()
else if value != null else if value?
formData.append name, value formData.append name, value
if parseInt($scope.track.track_type_id) == 2 if parseInt($scope.track.track_type_id) == 2