Fix/177 add check for gridref.current.api before using methods (#215)

This commit is contained in:
Matthew Russell 2022-04-07 15:27:34 -07:00 committed by GitHub
parent 98c1fc82f7
commit dbd0514515
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 3 additions and 3 deletions

View File

@ -19,7 +19,7 @@ export const MarketsContainer = () => {
(delta: Markets_markets_data) => {
const update: Markets_markets[] = [];
const add: Markets_markets[] = [];
if (!gridRef.current) {
if (!gridRef.current?.api) {
return false;
}
const rowNode = gridRef.current.api.getRowNode(

View File

@ -32,7 +32,7 @@ export const OrderListManager = ({ partyId }: OrderListManagerProps) => {
const add: OrderFields[] = [];
incoming.forEach((d) => {
if (!gridRef.current) {
if (!gridRef.current?.api) {
return;
}

View File

@ -21,7 +21,7 @@ export const PositionsManager = ({ partyId }: PositionsManagerProps) => {
(delta: PositionSubscribe_positions) => {
const update: Positions_party_positions[] = [];
const add: Positions_party_positions[] = [];
if (!gridRef.current) {
if (!gridRef.current?.api) {
return false;
}
const rowNode = gridRef.current.api.getRowNode(getRowNodeId(delta));