Skip to content

Commit

Permalink
fix: prevent stream render if dataType unknown (#448)
Browse files Browse the repository at this point in the history
  • Loading branch information
corteggiano committed Jan 9, 2023
1 parent ffaa88a commit 16999db
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,6 @@ it('provides data streams', async () => {
expect.objectContaining({
id: DATA_STREAM.id,
}),
expect.objectContaining({
id: DATA_STREAM_2.id,
}),
]),
viewport,
})
Expand Down Expand Up @@ -295,9 +292,6 @@ it('updates with new queries', async () => {
expect.objectContaining({
id: DATA_STREAM.id,
}),
expect.objectContaining({
id: DATA_STREAM_2.id,
}),
]),
viewport,
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ export class IotTimeSeriesConnector {
styleSettings: this.styleSettings,
assignDefaultColors: this.assignDefaultColors || false,
}).filter((stream) => {
if (!stream.dataType || stream.streamType === 'ALARM') return true;
if (stream.error || !stream.dataType) return false;
if (stream.streamType === 'ALARM') return true;
return this.supportedDataTypes.includes(stream.dataType);
});

Expand Down

0 comments on commit 16999db

Please sign in to comment.