Skip to content

Commit 1b6ad77

Browse files
committed
fix: do not nullify taxon photo based on lack of id
1 parent 202a6b0 commit 1b6ad77

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

lib/models/taxon.js

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -206,9 +206,6 @@ const Taxon = class Taxon extends Model {
206206
this.default_photo.url = util.fixHttps( this.default_photo.url );
207207
this.default_photo.medium_url = util.fixHttps( this.default_photo.medium_url );
208208
this.default_photo.square_url = util.fixHttps( this.default_photo.square_url );
209-
if ( !this.default_photo.id ) {
210-
this.default_photo = null;
211-
}
212209
}
213210
if ( this.taxon_photos ) {
214211
_.each( this.taxon_photos, tp => {
@@ -523,7 +520,6 @@ const Taxon = class Taxon extends Model {
523520
static async preloadIntoTaxonPhotos( taxa, options ) {
524521
options = options || { };
525522
const prepareTaxon = t => t.prepareForResponse( options.localeOpts );
526-
// const taxonPhotos = _.flatten( _.map( taxa, t => t.taxon_photos ) );
527523
_.each( taxa, taxon => {
528524
_.each( taxon.taxon_photos, taxonPhoto => {
529525
if ( taxonPhoto.taxon_id === taxon.id ) {

0 commit comments

Comments
 (0)