Skip to content

Commit

Permalink
Fix _customRouteId being ignored if a model wasn't initially found fo…
Browse files Browse the repository at this point in the history
…r the type
  • Loading branch information
swashbuck committed Jun 20, 2024
1 parent 330a72b commit 2f53fb9
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion js/PageNavModel.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,12 @@ class PageNavModel extends ComponentModel {

// Get models, skipping any undefined types (ex. deprecated button types)
let buttonModel = buttonTypeModels[type];
if (!buttonModel) continue;
if (!buttonModel && !buttonConfig._customRouteId) continue;

// Find buttonModel from config._customRouteId if not found in defined type
if (buttonConfig._customRouteId) {
buttonModel = data.findById(buttonConfig._customRouteId);
if (!buttonModel) continue;
}

// Convert found buttonModel to json if exists or create an 'undefined' json
Expand Down

0 comments on commit 2f53fb9

Please sign in to comment.