From e8169897438193a25212587f964ae0a2f0b41075 Mon Sep 17 00:00:00 2001 From: Michaelyin Date: Wed, 17 Jan 2024 16:52:21 +0800 Subject: [PATCH] update --- src/turbo_helper/turbo_power.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/turbo_helper/turbo_power.py b/src/turbo_helper/turbo_power.py index c0bcff2..bf3434c 100644 --- a/src/turbo_helper/turbo_power.py +++ b/src/turbo_helper/turbo_power.py @@ -64,11 +64,11 @@ def graft(targets=None, parent=None, **attributes): @register_turbo_stream_action("morph") def morph(targets=None, html=None, **attributes): - html = html or attributes["content"] + html = html or attributes.pop("content", None) return custom_action_all( "morph", targets=targets, - content=mark_safe(html), + content=mark_safe(html) if html else None, **attributes, )