plastikfan / jaxine

Another JSON to XML converter with inheritable attributes and custom element consolidation
MIT License
0 stars 0 forks source link

throwIfMissing not working #16

Open plastikfan opened 5 years ago

plastikfan commented 5 years ago

Not working when enabled. TypeError occurs and the following is the stack trace:

     TypeError: fn is not a function
      at find (node_modules/ramda/src/find.js:37:9)
      at /Users/Plastikfan/dev/github/js/jaxine/node_modules/ramda/src/internal/_dispatchable.js:41:15
      at /Users/Plastikfan/dev/github/js/jaxine/node_modules/ramda/src/internal/_curry2.js:22:18
      at f1 (node_modules/ramda/src/internal/_curry1.js:18:17)
      at buildChildren (webpack:///./lib/converter.impl.js?:318:57)
      at buildElementWithSpec (webpack:///./lib/converter.impl.js?:30:15)
      at XWrap.R.reduce [as f] (webpack:///./lib/converter.impl.js?:280:19)
      at XWrap.@@transducer/step (node_modules/ramda/src/internal/_xwrap.js:12:17)
      at _arrayReduce (node_modules/ramda/src/internal/_reduce.js:11:34)
      at _reduce (node_modules/ramda/src/internal/_reduce.js:45:12)
      at /Users/Plastikfan/dev/github/js/jaxine/node_modules/ramda/src/internal/_curry3.js:32:18
      at f1 (node_modules/ramda/src/internal/_curry1.js:18:17)
      at buildChildren (webpack:///./lib/converter.impl.js?:282:11)
      at Object.buildElementWithSpec (webpack:///./lib/converter.impl.js?:30:15)
      at R.curry (webpack:///./lib/converter.js?:97:15)
      at /Users/Plastikfan/dev/github/js/jaxine/node_modules/ramda/src/internal/_curryN.js:37:27
      at /Users/Plastikfan/dev/github/js/jaxine/node_modules/ramda/src/internal/_arity.js:22:19
      at Object.buildElement (webpack:///./lib/converter.js?:114:10)
      at Context.it (webpack:///./tests/converter.impl.spec.js?:50:30)
plastikfan commented 5 years ago

Also, throwIfMissing should throw if the attribute is defined but empty. Currently, it only throws if missing.