Skip to content

Conversation

@Julusian
Copy link
Member

@Julusian Julusian commented Apr 15, 2025

About the Contributor

This pull request is posted on behalf of the BBC

Type of Contribution

This is a: Bug fix

I haven't tested if this bug is present in R52, based on the findings it may want backporting

Current Behavior

Navigating to the peripheraldevice page for a subdevice would crash, trying to read a property off undefined:

Cannot read properties of undefined (reading 'subdeviceManifest')

TypeError: Cannot read properties of undefined (reading 'subdeviceManifest')
    at GenericAttahcedSubDeviceSettingsComponent

This is because since R50, the configManifest property should not be set on subdevices. This is enforced by the migration PeripheralDevice cleanup unused properties on child devices.
But the types say the propery must exist, resulting in typescript not flagging the type error.

The types have been updated to reflect this, and the crash fixed

Testing

  • I have added one or more unit tests for this PR
  • I have updated the relevant unit tests
  • No unit test changes are needed for this PR

Affected areas

Time Frame

Other Information

Status

  • PR is ready to be reviewed.
  • The functionality has been tested by the author.
  • Relevant unit tests has been added / updated.
  • Relevant documentation (code comments, system documentation) has been added / updated.

@Julusian Julusian requested a review from a team as a code owner April 15, 2025 10:27
@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

Attention: Patch coverage is 66.66667% with 2 lines in your changes missing coverage. Please review.

Project coverage is 54.00%. Comparing base (cf320d0) to head (c61bec6).
Report is 7 commits behind head on release53.

Files with missing lines Patch % Lines
meteor/server/api/peripheralDevice.ts 66.66% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           release53    #1431      +/-   ##
=============================================
- Coverage      54.23%   54.00%   -0.24%     
=============================================
  Files            404      404              
  Lines          73590    73586       -4     
  Branches        4987     5365     +378     
=============================================
- Hits           39910    39737     -173     
- Misses         33556    33721     +165     
- Partials         124      128       +4     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@Julusian Julusian force-pushed the upstream/fix-peripheraldevice-subdevice-page-crash branch from 3a83667 to c61bec6 Compare April 15, 2025 14:17
@nytamin nytamin merged commit 0a6b4ed into Sofie-Automation:release53 Apr 16, 2025
33 of 35 checks passed
@Julusian Julusian deleted the upstream/fix-peripheraldevice-subdevice-page-crash branch April 16, 2025 08:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants