Another null check fix (#61)

This commit is contained in:
Brahim Hadriche authored and GitHub committed 2023-04-05 18:35:56 -04:00
1 parent 8fa06bf05a
commit 3ce2baf683
2 files changed
+8 -2

No files matched your search

@@ -57,10 +57,15 @@ function StartFetchTask() as void
StartAsyncTask(GetHomeScreenContent, {
index: currentLoadingIndex,
requestData: m.defaultLayout[currentLoadingIndex]
}, function(output as object)
}, function(output as object) as void
' TODO: this whole logic is not good.
' The view should have placeholder, and child nodes get replaced as
' They get ready.
if output = invalid
StartFetchTask()
return
end if
m.sortedContent.Push(output.result)
if output.result.rootChildren.Count() > 0