@@ -387,18 +387,21 @@ export class AppComponent implements OnInit {
387387 preserveFragment : true } ) ;
388388 this . router . navigateByUrl ( urlTree ) ;
389389
390- // Get the series volume containing this comic
391- const expandedSeriesVolume = find ( this . seriesVolumes , [ 'id' , currentComic . seriesVolumeId ] ) ;
392- if ( ! expandedSeriesVolume ) {
393- return console . error ( 'The expanded series volume could not be found' , currentComic . seriesVolumeId ) ;
394- }
390+ let expandedSeriesVolume ;
391+ // Get the series volume containing this comic, if we don't already have the Marvel Unlimited comic ID
392+ if ( ! currentComic . marvelUnlimitedId ) {
393+ expandedSeriesVolume = find ( this . seriesVolumes , [ 'id' , currentComic . seriesVolumeId ] ) ;
394+ if ( ! expandedSeriesVolume ) {
395+ return console . error ( 'The expanded series volume could not be found' , currentComic . seriesVolumeId ) ;
396+ }
395397
396- if ( ! expandedSeriesVolume . marvelId ) {
397- // We await this because setAPIComicData depends on having a marvel ID set
398- expandedSeriesVolume . marvelId = await this . getMarvelSeriesVolumeId ( expandedSeriesVolume ) ;
398+ if ( ! expandedSeriesVolume . marvelId ) {
399+ // We await this because setAPIComicData depends on having a marvel ID set
400+ expandedSeriesVolume . marvelId = await this . getMarvelSeriesVolumeId ( expandedSeriesVolume ) ;
401+ }
399402 }
400403
401- this . apiInteractions . setAPIComicData ( currentComic , expandedSeriesVolume . marvelId ) ;
404+ this . apiInteractions . setAPIComicData ( currentComic , expandedSeriesVolume ? .marvelId ) ;
402405 }
403406
404407 /*
0 commit comments