Permalink
Browse files

Some CoffeeScript compiler iffyness

  • Loading branch information...
Leonidas-from-XIV committed Mar 11, 2013
1 parent 2d393ec commit ce47a551ee8510da3256b25950358eea655311cf
Showing with 17 additions and 10 deletions.
  1. +12 −8 lib/xml2js.js
  2. +5 −2 src/xml2js.coffee
View

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.
View
@@ -135,8 +135,11 @@ class exports.Parser extends events.EventEmitter
if Object.keys(obj).length == 1 and charkey of obj and not @EXPLICIT_CHARKEY
obj = obj[charkey]
- if isEmpty obj && stack.length > 0
- obj = @options.emptyTag != undefined ? @options.emptyTag : '';
+ if (isEmpty obj) and stack.length > 0
+ obj = if @options.emptyTag != undefined
+ @options.emptyTag
+ else
+ ''
if @options.validator?
xpath = "/" + (node["#name"] for node in stack).concat(nodeName).join("/")

0 comments on commit ce47a55

Please sign in to comment.