Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: do not crash on unknown chart + footer #1268

Merged
merged 2 commits into from
May 15, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apis/nucleus/src/components/Cell.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -569,7 +569,7 @@ const Cell = forwardRef(
>
{Content}
</Grid>
<Footer layout={layout} titleStyles={titleStyles} />
{cellNode && layout && state.sn && <Footer layout={layout} titleStyles={titleStyles} />}
</Grid>
{state.longRunningQuery && <LongRunningQuery canCancel={canCancel} canRetry={canRetry} api={longrunning} />}
</Paper>
Expand Down
4 changes: 2 additions & 2 deletions apis/nucleus/src/sn/__tests__/types.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,9 @@ describe('types', () => {
expect(v).toEqual('1.5.1');
});

test('should return null when no fit is found', () => {
test('should return undefined when no fit is found', () => {
const v = c.getSupportedVersion('pie', '1.2.0');
expect(v).toBe(null);
expect(v).toBe(undefined);
});

test('should return the requested type and version', () => {
Expand Down
2 changes: 1 addition & 1 deletion apis/nucleus/src/sn/types.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export function create({ halo, parent }) {
},
getSupportedVersion: (name, propertyVersion) => {
if (!tc[name]) {
return null;
return undefined;
}
return tc[name].getMatchingVersionFromProperties(propertyVersion);
},
Expand Down