From abbffbfa6a28808677bbb4335a9feefebde08fc4 Mon Sep 17 00:00:00 2001 From: Dave Pearson Date: Wed, 17 May 2023 15:30:13 +0100 Subject: [PATCH] Code tidy As per https://github.com/Textualize/textual/pull/2545#discussion_r1196591147 --- src/textual/widgets/_directory_tree.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/textual/widgets/_directory_tree.py b/src/textual/widgets/_directory_tree.py index b914bd7bc8..72a19ddf18 100644 --- a/src/textual/widgets/_directory_tree.py +++ b/src/textual/widgets/_directory_tree.py @@ -341,10 +341,11 @@ async def _loader(self) -> None: # This particular worker failed to start. We don't know the # reason so let's no-op that (for now anyway). pass - # We're still here and we have directory content, get it into - # the tree. - if content: - self._populate_node(node, content) + else: + # We're still here and we have directory content, get it into + # the tree. + if content: + self._populate_node(node, content) # Mark this iteration as done. self._load_queue.task_done()