Closed kskaret closed 8 years ago
Nice catch! I believe the error stems from something as simple as a typo though, in fact.
return out.endsWith('Success') ? callback() : Promise.reject(out)
would have been working, I guess (assuming that you're running Node>=4, or Node 0.12 with harmony-flags). Babel does not transpile that either, so running it on Node 0.12 without harmony will require a polyfill to be dragged in, which seems a bit excessive. With that in mind, your solution seems to be best :)
Thanks!
I'm pretty sure I found the fault. There's something wrong with the String comparison in out.indexOf(). I've never done any node / js before, but here is a solution that worked for me!