1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 12:07:45 +00:00

Assistant: Skip URL provider if query is empty or provider specific

This commit is contained in:
Edwin Hoksberg 2021-07-03 21:32:52 +02:00 committed by Andreas Kling
parent c06f72c264
commit a4b4397a10

View file

@ -218,6 +218,9 @@ void TerminalProvider::query(String const& query, Function<void(NonnullRefPtrVec
void URLProvider::query(String const& query, Function<void(NonnullRefPtrVector<Result>)> on_complete) void URLProvider::query(String const& query, Function<void(NonnullRefPtrVector<Result>)> on_complete)
{ {
if (query.is_empty() || query.starts_with('=') || query.starts_with('$'))
return;
URL url = URL(query); URL url = URL(query);
if (url.scheme().is_empty()) if (url.scheme().is_empty())