Skip to content

Commit

Permalink
Fix: Body compile support (#274)
Browse files Browse the repository at this point in the history
  • Loading branch information
oliverfoster authored Jun 25, 2024
2 parents 6f4f1a4 + 530746b commit 7078745
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion js/PageNavModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class PageNavModel extends ComponentModel {
// Get models, skipping any undefined types (ex. deprecated button types)
// Find buttonModel from config._customRouteId if not found in defined type
const buttonModel = buttonConfig._customRouteId
? data.findById(buttonConfig._customRouteId)
? this.getCustomRoutePage(buttonConfig._customRouteId)
: buttonTypeModels[type];

if (!buttonModel) continue;
Expand Down Expand Up @@ -140,6 +140,12 @@ class PageNavModel extends ComponentModel {
}
}

getCustomRoutePage(id) {
const buttonModel = data.findById(id);
if (!buttonModel || !buttonModel.get('_isAvailable')) return;
return buttonModel;
}

getPages() {
const loopStyle = this.get('_loopStyle');
let descendants = (loopStyle === 'allPages')
Expand Down

0 comments on commit 7078745

Please sign in to comment.