diff --git a/lib/pangea/choreographer/controllers/choreographer.dart b/lib/pangea/choreographer/controllers/choreographer.dart index e35fdf4fc..1fdcad5a2 100644 --- a/lib/pangea/choreographer/controllers/choreographer.dart +++ b/lib/pangea/choreographer/controllers/choreographer.dart @@ -116,10 +116,9 @@ class Choreographer { // we've got a rather elaborate method of updating tokens after matches are accepted // so we need to check if the reconstructed text matches the current text // if not, let's get the tokens again and log an error - final reconstructedText = - PangeaToken.reconstructText(igc.igcTextData!.tokens); if (igc.igcTextData?.tokens != null && - reconstructedText.trim() != currentText.trim()) { + PangeaToken.reconstructText(igc.igcTextData!.tokens).trim() != + currentText.trim()) { if (kDebugMode) { PangeaToken.reconstructText( igc.igcTextData!.tokens, diff --git a/lib/pangea/choreographer/controllers/it_controller.dart b/lib/pangea/choreographer/controllers/it_controller.dart index f2d3e1ed4..097726588 100644 --- a/lib/pangea/choreographer/controllers/it_controller.dart +++ b/lib/pangea/choreographer/controllers/it_controller.dart @@ -146,6 +146,8 @@ class ITController { // ? _customInputTranslation(currentText) // : _systemChoiceTranslation(translationId)); + if (sourceText == null) return; + if (res.goldContinuances != null && res.goldContinuances!.isNotEmpty) { goldRouteTracker = GoldRouteTracker( res.goldContinuances!,