Make sure callbacks have a name. #968

/slap @milkytiptoe
This commit is contained in:
Nicolas Stepien 2013-03-25 03:36:50 +01:00
parent 607c935e0d
commit f745947602

View File

@ -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