Skip to content

Commit

Permalink
[EEG Browser] Viz loading issue (#9527)
Browse files Browse the repository at this point in the history
Handling a race condition preventing the EEG visualization to load
properly

To prevent the issue, the component returns null until the store data is
loaded.
  • Loading branch information
laemtl authored Jan 8, 2025
1 parent 03d4710 commit a94dc0b
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,9 @@ const ResponsiveViewer : FunctionComponent<CProps> = ({
const layers = React.Children.toArray(children).map(provision);

const domain = window.EEGLabSeriesProviderStore[chunksURL]?.getState().bounds.domain;
// Data not loaded yet
if (!domain) return null;

const amplitude = [0, 1];
const eventScale = [
scaleLinear()
Expand Down

0 comments on commit a94dc0b

Please sign in to comment.