开发者

CoffeeScript Indent Error

Any idea why this would throw an error when compiling?

(window) ->

    # pubsub
    App.publish = (topic,args) ->
        App.subscriptions[to开发者_开发问答pic] and $.each(App.subscriptions[topic], ->
            this.apply(App, args or [])

http://jsfiddle.net/wesbos/4Kf2B/


Never mind, I'm silly and forgot a remove paren :\

(window) ->

# pubsub
App.publish = (topic,args) ->
    App.subscriptions[topic] and $.each App.subscriptions[topic], ->
        this.apply(App, args or [])
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜