Skip to content

Commit

Permalink
Add a comment to clarify project menu model normalization (#230)
Browse files Browse the repository at this point in the history
  • Loading branch information
jgonggrijp committed Oct 9, 2024
1 parent 63bf97e commit 481deea
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions frontend/vre/project/project.menu.view.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,9 @@ export var ProjectMenuView = AggregateView.extend({
},

select: function (model) {
// At this point, `model` could either be an instance of `Project` or
// just an id. The next line ensures that it is a full-blown instance
// (or `undefined`).
model = this.collection.get(model);
if (!model) return;
if (model === this.model) return;
Expand Down

0 comments on commit 481deea

Please sign in to comment.