From 3b27b3553a5f172b2b07f628faa8181a81335001 Mon Sep 17 00:00:00 2001 From: Tomek Gryszkiewicz Date: Sun, 15 Jul 2018 14:30:21 +0200 Subject: [PATCH] modal accepts only socket --- lib/drab/modal.ex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/drab/modal.ex b/lib/drab/modal.ex index 4e4b1c1..54a4811 100644 --- a/lib/drab/modal.ex +++ b/lib/drab/modal.ex @@ -74,7 +74,7 @@ defmodule Drab.Modal do @spec alert(Phoenix.Socket.t(), String.t(), String.t(), Keyword.t()) :: Drab.Core.return() | no_return @spec alert(Phoenix.Socket.t(), String.t(), String.t()) :: Drab.Core.return() | no_return - def alert(socket, title, body, options \\ []) do + def alert(%Phoenix.Socket{} = socket, title, body, options \\ []) do buttons = options[:buttons] || [ok: "OK"] bindings = [