Commit 478b9b3 Chomp
committed
1 parent aa928ac commit 478b9b3 Copy full SHA for 478b9b3
File tree 1 file changed +7
-7
lines changed
1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change @@ -490,6 +490,13 @@ export class RepeatableQuestController {
490
490
changeRequest . qid ,
491
491
pmcData ,
492
492
) ;
493
+ if ( ! repeatablesInProfile || ! questToReplace ) {
494
+ // Unable to find quest being replaced
495
+ const message = this . localisationService . getText ( "quest-unable_to_find_repeatable_to_replace" ) ;
496
+ this . logger . error ( message ) ;
497
+
498
+ return this . httpResponse . appendErrorToOutput ( output , message ) ;
499
+ }
493
500
494
501
// Subtype name of quest - daily/weekly/scav
495
502
const repeatableTypeLower = repeatablesInProfile . name . toLowerCase ( ) ;
@@ -571,13 +578,6 @@ export class RepeatableQuestController {
571
578
572
579
// Clone data before we send it to client
573
580
const repeatableToChangeClone = this . cloner . clone ( repeatablesInProfile ) ;
574
- if ( ! repeatableToChangeClone ) {
575
- // Unable to find quest being replaced
576
- const message = this . localisationService . getText ( "quest-unable_to_find_repeatable_to_replace" ) ;
577
- this . logger . error ( message ) ;
578
-
579
- return this . httpResponse . appendErrorToOutput ( output , message ) ;
580
- }
581
581
582
582
// Purge inactive repeatables
583
583
repeatableToChangeClone . inactiveQuests = [ ] ;
You can’t perform that action at this time.
0 commit comments