Skip to content

Commit

Permalink
Use assigns. instead of Map.get
Browse files Browse the repository at this point in the history
  • Loading branch information
woutdp committed Aug 16, 2023
1 parent 474304a commit b4a908b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/component.ex
Original file line number Diff line number Diff line change
Expand Up @@ -54,15 +54,15 @@ 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
|> Slots.rendered_slot_map()
|> Slots.js_process()

ssr_code =
if init and Map.get(assigns, :ssr) do
if init and assigns.ssr do
try do
props =
Map.merge(
Expand Down

0 comments on commit b4a908b

Please sign in to comment.