Skip to content

Commit

Permalink
Fixed TypeError: Cannot read property 'value' of undefined to resolve #…
Browse files Browse the repository at this point in the history
…35.

Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>

Free Software Free Society

To support commits by ctubio,
you can buy-me-a-drink with a small git tip at:
  1GitTipgxvKB3zjCLXRcSgDhC9pivkpc7u

I promise to drink chocolate milk in the development of the next commit.

To request new features or in case this commit breaks something for you,
please create a new github issue with all possible details,
but never share your API Keys!

Signed-off-by: Carles Tubio <ctubio@users.noreply.github.com>
  • Loading branch information
ctubio committed Jul 3, 2017
1 parent 1b332a3 commit 4a0193a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/server/fair-value.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class FairValueEngine {
private _publisher: Publish.Publisher,
initRfv: Models.RegularFairValue[]
) {
if (initRfv !== null)
if (initRfv !== null && initRfv.length)
this.latestFairValue = new Models.FairValue(initRfv[0].value, initRfv[0].time);

filtration.FilteredMarketChanged.on(() => this.recalcFairValue(filtration.latestFilteredMarket));
Expand Down

0 comments on commit 4a0193a

Please sign in to comment.