Skip to content

Commit

Permalink
use assertNotNull
Browse files Browse the repository at this point in the history
  • Loading branch information
wusteven815 committed Sep 19, 2024
1 parent 93da043 commit a03aa12
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions plugins/ui/src/js/src/elements/ListView.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import { isElementOfType } from '@deephaven/react-hooks';
import { getSettings, RootState } from '@deephaven/redux';
import { ListView as DHListView } from '@deephaven/components';
import { ListView as DHListViewJSApi } from '@deephaven/jsapi-components';
import { assertNotNull } from '@deephaven/utils';
import {
SerializedListViewProps,
useListViewProps,
Expand All @@ -17,9 +18,7 @@ export function ListView(props: SerializedListViewProps): JSX.Element | null {
const isObjectView = isElementOfType(children, ObjectView);
const table = useReExportedTable(children);

if (children == null) {
throw new Error('Children must be defined for list_view.');
}
assertNotNull(children, 'Children must be defined for list_view.');

if (isObjectView) {
return (
Expand Down

0 comments on commit a03aa12

Please sign in to comment.