Created
April 24, 2012 16:44
-
-
Save tomdale/2481356 to your computer and use it in GitHub Desktop.
One CoffeeScript ambiguity
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
App.messageController = Ember.Object.create | |
message: "Hello, world!" | |
# Compiles to: | |
# App.messageController = Ember.Object.create({ | |
# message: "Hello, world!" | |
# }); | |
# Okay, let's refactor it and delete the message property: | |
App.messageController = Ember.Object.create | |
# Compiles to: | |
# App.messageController = Ember.Object.create | |
# Oops, your controller is now the Ember.Object#create function! |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
same as
and
:)