mirror of
https://github.com/woutdp/live_svelte
synced 2026-05-24 09:28:21 +00:00
Use assigns. instead of Map.get
This commit is contained in:
parent
474304aa83
commit
b4a908b0ba
1 changed files with 2 additions and 2 deletions
|
|
@ -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(
|
||||
|
|
|
|||
Loading…
Reference in a new issue