coffee-script icon indicating copy to clipboard operation
coffee-script copied to clipboard

autocb is not defined

Open ypapax opened this issue 11 years ago • 2 comments

In iced coffee script version 1.6.3-f autocb is working. But in later versions is not:

   ❯ iced --version                                                                                                                                                                                              
   IcedCoffeeScript version 1.7.1-g

  ❯ iced /path/to/file.iced                                                                                                                               
 ReferenceError: autocb is not defined
 at /path/to/file.iced:10:5

where /path/to/file.iced is:

 is200_async = require './is200_async.iced'
 module.exports = (url, autocb)=>
       await is200_async url, defer()

ypapax avatar Sep 22 '14 07:09 ypapax

I should investigate further but a quick fix is to use -> rather than =>

 is200_async = require './is200_async.iced'
 module.exports = (url, autocb) ->
       await is200_async url, defer()

maxtaco avatar Sep 22 '14 18:09 maxtaco

Thank you, maxtaco, autocb works ok with -> in version 1.7.1-g.

ypapax avatar Sep 22 '14 18:09 ypapax