Skip to content

Commit

Permalink
Merge pull request #58 from qlik-oss/DEB-173/MasterObject
Browse files Browse the repository at this point in the history
Fixed master object bug
  • Loading branch information
AlbertBackenhof authored May 3, 2019
2 parents 2f59d97 + 5d45f57 commit b3b17e8
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/dataset.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,13 @@ export async function initializeDataCube (component, layout) {
}

const app = qlik.currApp(component);
const hyperCubeDef = (await component.backendApi.getProperties()).qHyperCubeDef;
const properties = (await component.backendApi.getProperties());

// If this is a master object, fetch the hyperCubeDef of the original object
const hyperCubeDef = properties.qExtendsId
? (await app.getObjectProperties(properties.qExtendsId)).properties.qHyperCubeDef
: properties.qHyperCubeDef;

return buildDataCube(hyperCubeDef, layout.qHyperCube.qDimensionInfo.length === 2, app);
}

Expand Down

0 comments on commit b3b17e8

Please sign in to comment.