Skip to content

Commit

Permalink
Merge pull request #78 from solid-daniilmarchenko/fix/has-result-check
Browse files Browse the repository at this point in the history
hasResult check
  • Loading branch information
solid-yuriiprykhodko committed Jan 30, 2024
2 parents 947ec58 + 05290f8 commit 6a03c0c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/core/controllers/language_tool_controller.dart
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ class LanguageToolController extends TextEditingController {
final mistakesWrapper = await _latestResponseService.processLatestOperation(
() => _languageCheckService?.findMistakes(newText) ?? Future(() => null),
);
final mistakes = mistakesWrapper?.result();
_fetchError = mistakesWrapper?.error;
if (mistakesWrapper == null || !mistakesWrapper.hasResult) return;

if (mistakes == null) return;
final mistakes = mistakesWrapper.result();
_fetchError = mistakesWrapper.error;

_mistakes = mistakes;
notifyListeners();
Expand Down

0 comments on commit 6a03c0c

Please sign in to comment.