From 2f3ba7550caf45b1687548ac822199bb1fe516e8 Mon Sep 17 00:00:00 2001 From: Taylor Downs Date: Sun, 10 Nov 2024 15:07:28 +0300 Subject: [PATCH] Handle the modal_close event in WorkflowLive.edit (#2649) * close #2622 --------- Co-authored-by: Stuart Corbishley --- CHANGELOG.md | 3 +++ lib/lightning_web/live/workflow_live/edit.ex | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5574f671e6..f28ff8ff91 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -21,6 +21,9 @@ and this project adheres to ### Fixed +- Fix LiveView crash when pressing "esc" on inspector + [#2622](https://github.com/OpenFn/lightning/issues/2622) + ## [v2.10.0-rc.1] - 2024-11-08 ### Changed diff --git a/lib/lightning_web/live/workflow_live/edit.ex b/lib/lightning_web/live/workflow_live/edit.ex index 645a317650..1e1c1b07d4 100644 --- a/lib/lightning_web/live/workflow_live/edit.ex +++ b/lib/lightning_web/live/workflow_live/edit.ex @@ -1661,6 +1661,11 @@ defmodule LightningWeb.WorkflowLive.Edit do end end + def handle_event(_unhandled_event, _params, socket) do + # TODO: add a warning and/or log for unhandled events + {:noreply, socket} + end + @impl true def handle_info( %WorkflowUpdated{workflow: updated_workflow},