Skip to content
This repository has been archived by the owner on Feb 15, 2022. It is now read-only.

Zero amount handling in engine.js #325

Closed
tuxitor opened this issue Jun 23, 2017 · 1 comment
Closed

Zero amount handling in engine.js #325

tuxitor opened this issue Jun 23, 2017 · 1 comment
Labels

Comments

@tuxitor
Copy link
Contributor

tuxitor commented Jun 23, 2017

engine.js bails out if zero values are received

2017-06-23 02:24:44  0.28 XRP-USD   -0.4%    98467    --         0.30%             0.00 XRP   0.00 USD/home/eigilb/Prosjekt/Z/work/node_modules/numbro/numbro.js:1111
        var parts = x.toString().split('.');
                     ^

TypeError: Cannot read property 'toString' of undefined
    at multiplier (/home/eigilb/Prosjekt/Z/work/node_modules/numbro/numbro.js:1111:22)
    at /home/eigilb/Prosjekt/Z/work/node_modules/numbro/numbro.js:1127:22
    at Array.reduce (native)
    at correctionFactor (/home/eigilb/Prosjekt/Z/work/node_modules/numbro/numbro.js:1125:21)
    at cback (/home/eigilb/Prosjekt/Z/work/node_modules/numbro/numbro.js:1218:34)
    at Array.reduce (native)
    at Object.multiply (/home/eigilb/Prosjekt/Z/work/node_modules/numbro/numbro.js:1224:48)
    at writeReport (/home/eigilb/Prosjekt/Z/work/lib/engine.js:715:72)
    at Timeout._onTimeout (/home/eigilb/Prosjekt/Z/work/lib/engine.js:633:11)
    at ontimeout (timers.js:386:14)
    at tryOnTimeout (timers.js:250:5)
    at Timer.listOnTimeout (timers.js:214:5)
@haxwell
Copy link
Contributor

haxwell commented Dec 19, 2017

I think this is the same as #457, which has been resolved.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants