UI/Qt: Invert check for DuckDuckGo autocomplete parse results

This commit is contained in:
Timothy Flynn 2025-03-19 17:05:02 -04:00 committed by Jelle Raaijmakers
parent 86a93b9b47
commit 8847079d8a
Notes: github-actions[bot] 2025-03-20 09:51:43 +00:00

View file

@ -69,7 +69,7 @@ ErrorOr<Vector<String>> AutoComplete::parse_duckduckgo_autocomplete(Vector<JsonV
if (!suggestion.is_object())
return Error::from_string_literal("Invalid JSON, expected value to be an object");
if (auto value = suggestion.as_object().get_string("phrase"sv); !value.has_value())
if (auto value = suggestion.as_object().get_string("phrase"sv); value.has_value())
results.append(*value);
}