Merge pull request #3306 from Jack251970/install_unknown_null

Fix null reference exception when checking source
This commit is contained in:
Jack Ye 2025-03-05 15:03:43 +08:00 committed by GitHub
commit a4111ae9c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -593,7 +593,10 @@ namespace Flow.Launcher.Plugin.PluginsManager
var constructedUrlPart = string.Format("{0}/{1}/", acceptedSource, author);
return url.StartsWith(acceptedSource) &&
Context.API.GetAllPlugins().Any(x => x.Metadata.Website.StartsWith(constructedUrlPart));
Context.API.GetAllPlugins().Any(x =>
!string.IsNullOrEmpty(x.Metadata.Website) &&
x.Metadata.Website.StartsWith(constructedUrlPart)
);
}
internal async ValueTask<List<Result>> RequestInstallOrUpdateAsync(string search, CancellationToken token,