From a583f21b0a9654c1f77cae08f549a8a8eb40fd76 Mon Sep 17 00:00:00 2001 From: Andy Williams Date: Thu, 9 May 2024 10:54:10 +0930 Subject: [PATCH] Fix crash when draft_items is nil --- app/components/katalyst/content/editor_component.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/katalyst/content/editor_component.html.erb b/app/components/katalyst/content/editor_component.html.erb index 1f6c10d..1874315 100644 --- a/app/components/katalyst/content/editor_component.html.erb +++ b/app/components/katalyst/content/editor_component.html.erb @@ -4,6 +4,6 @@ <%= render errors %> <%= render Katalyst::Content::Editor::TableComponent.new(container:) do |list| %> - <%= container.draft_items.each { |item| list.with_item(item) } %> + <%= container.draft_items&.each { |item| list.with_item(item) } %> <% end %> <% end %>