Permalink
Browse files

fixed broken compilation due to pull #2430

  • Loading branch information...
1 parent a396837 commit 5d7a83468abce3abe5ac236342201dd3ce6653a7 @michaelficarra michaelficarra committed Jul 11, 2012
Showing with 5 additions and 5 deletions.
  1. +3 −3 lib/coffee-script/coffee-script.js
  2. +2 −2 src/coffee-script.coffee
Oops, something went wrong.
View
@@ -13,12 +13,12 @@ path = require 'path'
vm = require 'vm'
stripBOM = (content) ->
- if content.charCodeAt 0 is 0xFEFF then content.substring 1 else content
+ if content.charCodeAt(0) is 0xFEFF then content.substring 1 else content
# TODO: Remove registerExtension when fully deprecated.
if require.extensions
require.extensions['.coffee'] = (module, filename) ->
- content = compile stripBOM fs.readFileSync(filename, 'utf8'), {filename}
+ content = compile stripBOM(fs.readFileSync filename, 'utf8'), {filename}
module._compile content, filename
else if require.registerExtension
require.registerExtension '.coffee', (content) -> compile content

2 comments on commit 5d7a834

Contributor

Oh how embarrassing -_-. I am just not smart enough to do paren-less function calls, I think. Thanks for the save @michaelficarra.

I generally avoid paren-less calls unless the last argument is a callback. The paren-ful code is much more readable.

Please sign in to comment.