Permalink
Browse files

fix empty blocks as expressions

  • Loading branch information...
1 parent f6af622 commit 4c5acf05e90f88cf0afde90804cdc5152e62d8ed @thejh committed Jan 14, 2012
Showing with 3 additions and 1 deletion.
  1. +3 −1 src/nodes.coffee
View
@@ -262,7 +262,9 @@ exports.Block = class Block extends Base
return CodeString this, '\n', (CodeString.join this, codes, '\n\n'), '\n'
else
return CodeString.join this, codes, '\n'
- code = (CodeString.join this, codes, ', ') or (CodeString this, 'void 0')
+ code = CodeString.join this, codes, ', '
+ if code.length is 0
+ code = CodeString this, 'void 0'
if codes.length > 1 and o.level >= LEVEL_LIST then (CodeString this, '(', code, ')') else code
# If we happen to be the top-level **Block**, wrap everything in

0 comments on commit 4c5acf0

Please sign in to comment.