Skip to content

Commit

Permalink
cockpit.js: make access to Gid field conditional
Browse files Browse the repository at this point in the history
cockpit.js can be bundled with users which don't depend on the
latest-and-greatest bridge version, so we have to deal with the case
where this field isn't present.

Let's not bother mentioning that in the type annotations — things will
catch up eventually.  The actual access to this properly is causing
Oopses today, though, so it needs to be fixed.
  • Loading branch information
allisonkarlitskaya committed Jun 4, 2024
1 parent 9aacc51 commit faf134e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/lib/cockpit.js
Original file line number Diff line number Diff line change
Expand Up @@ -2380,7 +2380,7 @@ function factory() {
.then(([user]) => {
the_user = {
id: user.Id.v,
gid: user.Gid.v,
gid: user.Gid?.v,
name: user.Name.v,
full_name: user.Full.v,
groups: user.Groups.v,
Expand Down

0 comments on commit faf134e

Please sign in to comment.