Skip to content

Commit

Permalink
Merge pull request #16 from T-Wizard/master-measure-format
Browse files Browse the repository at this point in the history
fix: handle when qNumFormat is null
  • Loading branch information
Caele authored Jun 10, 2020
2 parents 9d6f437 + d9da648 commit 0f03639
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/converthypercube.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ class ConvertHypercube {
qMax: max, //mesInfo.qMax,
qMin: min, //mesInfo.qMin,
qSortIndicator: mesInfo.qSortIndicator,
qNumFormat: {
qNumFormat: mesInfo.qNumFormat && {
qDec: mesInfo.qNumFormat.qDec,
qFmt: mesInfo.qNumFormat.qFmt,
qThou: mesInfo.qNumFormat.qThou,
Expand Down
2 changes: 1 addition & 1 deletion src/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ export async function initVarianceCube(component, layout) {

const measures = hyperCubeDef.qMeasures;
let expression;
if (JSON.stringify(measures[0].qDef.qNumFormat) === JSON.stringify(measures[1].qDef.qNumFormat)) {
if (JSON.stringify(measures[0].qDef.qNumFormat) === JSON.stringify(measures[1].qDef.qNumFormat) && measures[0].qDef.qNumFormat) {
let formatter;
switch (measures[0].qDef.qNumFormat.qType) {
case "D":
Expand Down

0 comments on commit 0f03639

Please sign in to comment.