From f7459476027a9175e0eee1f25462d06f3109c379 Mon Sep 17 00:00:00 2001 From: Nicolas Stepien Date: Mon, 25 Mar 2013 03:36:50 +0100 Subject: [PATCH] =?UTF-8?q?Make=20sure=20callbacks=20have=20a=20name.?= =?UTF-8?q?=C2=A0#968=20/slap=20@milkytiptoe?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/main.coffee | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main.coffee b/src/main.coffee index 1ae729a20..ca2ff15e4 100644 --- a/src/main.coffee +++ b/src/main.coffee @@ -477,7 +477,9 @@ Main = Main.handleErrors errors if errors addCallback: (e) -> - obj = e.detail + obj = e.detail + unless typeof obj.callback.name is 'string' + throw new Error "Invalid callback name: #{obj.callback.name}" Klass = if obj.type is 'Post' Post else