From b4a908b0ba6acb0b5fddc7bf0fbad2ea157caf09 Mon Sep 17 00:00:00 2001 From: Wout De Puysseleir Date: Tue, 15 Aug 2023 17:22:34 -0700 Subject: [PATCH] Use assigns. instead of Map.get --- lib/component.ex | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/component.ex b/lib/component.ex index 4c52e30..c3da42e 100644 --- a/lib/component.ex +++ b/lib/component.ex @@ -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(