Skip to content

Commit 20bbfb4

Browse files
committed
systemd: initialize pinnedUnits state
This issue has been uncovered by adding a link to the logs page from cockpit-podman. Once clicking on it the initial state is undefined and the ServiceDetails page raises an exception: > error: TypeError: Cannot read properties of undefined (reading 'includes') > error: The above error occurred in the <ServiceDetails> component: at ServiceDetails (http://127.0.0.2:9691/cockpit/@localhost/system/services.js:38578:7)
1 parent 4d5f079 commit 20bbfb4

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pkg/systemd/services.jsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -182,6 +182,7 @@ class ServicesPageBody extends React.Component {
182182
/* State related to the toolbar components */
183183
isFullyLoaded: false,
184184
error: null,
185+
pinnedUnits: [],
185186
};
186187

187188
/* data storage

0 commit comments

Comments
 (0)