Skip to content

applets/devicenotifier: handle unmounting gracefully

Reason for the change

The deviceActions property from the beckend is briefly undefined when a device is unmounted. As its properties are accessed to set the icon and text of the default button and these are updated thorugh property bindings, this causes warning messages to be printed.

Instead, guard against this with optional chaining and a reasonable default value.

Test plan

  1. Mount device
  2. Unmount device
  3. (without) TypeErrors (with) no TypeErrors

Screenshots or screen recordings

N/A

Bugs fixed

N/A

Merge request reports

Loading