kaffeine icon indicating copy to clipboard operation
kaffeine copied to clipboard

"foo['batz']! someArgs" results in Error

Open benekastah opened this issue 14 years ago • 2 comments

Async function calls don't respect functions accessed from an object with the bracket syntax. The specific error is: Error: Unexpected token: operator (!)

benekastah avatar Jun 21 '11 03:06 benekastah

Can you give an example ?

On Tue, Jun 21, 2011 at 4:31 AM, benekastah < [email protected]>wrote:

Async function calls don't respect functions accessed from an object with the bracket syntax.

Reply to this email directly or view it on GitHub: https://github.com/weepy/kaffeine/issues/34

weepy avatar Jun 21 '11 07:06 weepy

The code

method = :get
server[method]! route
doStuff()

generates an error. I would expect it to do this:

method = 'get'
server[method](route, function() {
doStuff()
})

benekastah avatar Jun 21 '11 07:06 benekastah