Skip to content

Commit

Permalink
Merge pull request #1002 from pangeachat/fix-it-error
Browse files Browse the repository at this point in the history
fix some null check errors in IT
  • Loading branch information
ggurdin authored Nov 14, 2024
2 parents 2a84ce8 + 4c1ecc6 commit c51e3c4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/pangea/choreographer/controllers/choreographer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions lib/pangea/choreographer/controllers/it_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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!,
Expand Down

0 comments on commit c51e3c4

Please sign in to comment.