Skip to content

Commit

Permalink
Fix/making-metadata-possibly-undefined (#229)
Browse files Browse the repository at this point in the history
**User-Facing Changes**
N/A

**Description**
In order to guarantee extensions compatibility with Foxglove metadata
can now be undefined, this way future extensions devs will get warnings
if they try to access metadata property.

**Checklist**

- [X] The web version was tested and it is running ok
- [X] The desktop version was tested and it is running ok
- [ ] This change is covered by unit tests
  • Loading branch information
ctw-joao-luis authored Oct 18, 2024
1 parent e431262 commit 663914b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/suite/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ export type PanelExtensionContext = {
* An array of metadata entries. Each entry includes a name and a map of key-value pairs
* representing the metadata associated with that name (only avaiable in MCAP files).
*/
readonly metadata: ReadonlyArray<Readonly<Metadata>>;
readonly metadata?: ReadonlyArray<Readonly<Metadata>>;

/**
* Subscribe to updates on this field within the render state. Render will only be invoked when
Expand Down

0 comments on commit 663914b

Please sign in to comment.