Checks if the TabStack is the root content item
Check if a TabStack isRoot, and check the parent ColumnOrRow
if (!fin.me.isView) {
throw new Error('Not running in a platform View.');
}
const stack = await fin.me.getCurrentStack();
const isRoot = await stack.isRoot();
// The TabStack is root: false
console.log(`The TabStack is root: ${isRoot}`);
// Retrieves the parent ColumnOrRow
const parent = await stack.getParent();
const parentIsRoot = await parent.isRoot();
// The parent ColumnOrRow is root: true
console.log(`The parent ColumnOrRow is root: ${parentIsRoot}`);