Skip to content

Commit 577f956

Browse files
Merge pull request #1027 from liveview-native/encoded-modifier-stack-fix
Fix `EncodedModifierStack` cast
2 parents ff6180b + e5a51f5 commit 577f956

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/live_view_native_swift_ui/types/encoded_modifier_stack.ex

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@ defmodule LiveViewNativeSwiftUi.Types.EncodedModifierStack do
22
use LiveViewNativePlatform.Modifier.Type
33
def type, do: :string
44

5-
def cast(value) when is_struct(value, LiveViewNativePlatform.Context) do
6-
{:ok, Jason.encode!(value.modifiers)}
5+
def cast(%LiveViewNativeSwiftUi.Modifiers{} = modifiers) do
6+
{:ok, Jason.encode!(modifiers)}
77
end
88
def cast(_), do: :error
99
end

0 commit comments

Comments
 (0)