From 9d9e6dfc579fb60998e1a2fe1b78c66dc804ad25 Mon Sep 17 00:00:00 2001 From: jld3103 Date: Fri, 4 Aug 2023 13:14:33 +0200 Subject: [PATCH] fix(neon_notes): Fix creating note with empty categories --- packages/neon/neon_notes/lib/widgets/category_select.dart | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/neon/neon_notes/lib/widgets/category_select.dart b/packages/neon/neon_notes/lib/widgets/category_select.dart index 14f3a555..040cf27d 100644 --- a/packages/neon/neon_notes/lib/widgets/category_select.dart +++ b/packages/neon/neon_notes/lib/widgets/category_select.dart @@ -15,7 +15,7 @@ class NotesCategorySelect extends StatelessWidget { categories.sort(); // After sorting the empty category '' should be at the first place - if (!categories.first.isNotEmpty) { + if (categories.isNotEmpty && !categories.first.isNotEmpty) { categories.insert(0, ''); } }