From cffc879ba757c1a31bbefc0856ce98891bd72807 Mon Sep 17 00:00:00 2001 From: Xananax Date: Sun, 5 Mar 2023 15:43:33 +0400 Subject: [PATCH] fix: weird bug when clicking everywhere fast --- ui/time_entries_items_tree.gd | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ui/time_entries_items_tree.gd b/ui/time_entries_items_tree.gd index 1a06266..5f41075 100644 --- a/ui/time_entries_items_tree.gd +++ b/ui/time_entries_items_tree.gd @@ -36,8 +36,11 @@ func get_current_text() -> String: var item := get_selected() if not item: return "" - var resp: String = item.get_metadata(COL.TEXT) - return resp + + var resp = item.get_metadata(COL.TEXT) + if resp is String: + return resp + return "" ## Adds a new item to the tree, or returns the old item if it exists