mirror of
https://github.com/Flow-Launcher/Flow.Launcher.git
synced 2026-03-11 08:54:32 +00:00
quick exit when children property is not found
This commit is contained in:
parent
8cb7cbb1bc
commit
4c10208008
1 changed files with 4 additions and 2 deletions
|
|
@ -26,7 +26,7 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
}
|
||||
return bookmarks;
|
||||
}
|
||||
|
||||
|
||||
protected List<Bookmark> LoadBookmarksFromFile(string path, string source)
|
||||
{
|
||||
if (!File.Exists(path))
|
||||
|
|
@ -44,7 +44,9 @@ namespace Flow.Launcher.Plugin.BrowserBookmark
|
|||
|
||||
private void EnumerateFolderBookmark(JsonElement folderElement, List<Bookmark> bookmarks, string source)
|
||||
{
|
||||
foreach (var subElement in folderElement.GetProperty("children").EnumerateArray())
|
||||
if (!folderElement.TryGetProperty("children", out var childrenElement))
|
||||
return;
|
||||
foreach (var subElement in childrenElement.EnumerateArray())
|
||||
{
|
||||
switch (subElement.GetProperty("type").GetString())
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue