Use assigns. instead of Map.get

This commit is contained in:
Wout De Puysseleir 2023-08-15 17:22:34 -07:00
parent 474304aa83
commit b4a908b0ba
No known key found for this signature in database
GPG key ID: 3DE9371B50FEC46A

View file

@ -54,7 +54,7 @@ defmodule LiveSvelte do
Renders a Svelte component on the server.
"""
def svelte(assigns) do
init = Map.get(assigns, :__changed__) == nil
init = assigns.__changed__ == nil
slots =
assigns
@ -62,7 +62,7 @@ defmodule LiveSvelte do
|> Slots.js_process()
ssr_code =
if init and Map.get(assigns, :ssr) do
if init and assigns.ssr do
try do
props =
Map.merge(