Merge pull request #354 from karyeet/album-isrc-sto-patch

SimplifiedTrackObject from album does not have external_ids
This commit is contained in:
AtariTom 2023-07-12 17:37:10 -04:00 committed by GitHub
commit 76c237346e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -128,7 +128,7 @@ export class SpotifyTrack {
constructor(data: any) {
this.name = data.name;
this.id = data.id;
this.isrc = data.external_ids.isrc || '';
this.isrc = data.external_ids?.isrc || '';
this.type = 'track';
this.url = data.external_urls.spotify;
this.explicit = data.explicit;