Fix/177 add check for gridref.current.api before using methods (#215)
This commit is contained in:
parent
98c1fc82f7
commit
dbd0514515
@ -19,7 +19,7 @@ export const MarketsContainer = () => {
|
|||||||
(delta: Markets_markets_data) => {
|
(delta: Markets_markets_data) => {
|
||||||
const update: Markets_markets[] = [];
|
const update: Markets_markets[] = [];
|
||||||
const add: Markets_markets[] = [];
|
const add: Markets_markets[] = [];
|
||||||
if (!gridRef.current) {
|
if (!gridRef.current?.api) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const rowNode = gridRef.current.api.getRowNode(
|
const rowNode = gridRef.current.api.getRowNode(
|
||||||
|
@ -32,7 +32,7 @@ export const OrderListManager = ({ partyId }: OrderListManagerProps) => {
|
|||||||
const add: OrderFields[] = [];
|
const add: OrderFields[] = [];
|
||||||
|
|
||||||
incoming.forEach((d) => {
|
incoming.forEach((d) => {
|
||||||
if (!gridRef.current) {
|
if (!gridRef.current?.api) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ export const PositionsManager = ({ partyId }: PositionsManagerProps) => {
|
|||||||
(delta: PositionSubscribe_positions) => {
|
(delta: PositionSubscribe_positions) => {
|
||||||
const update: Positions_party_positions[] = [];
|
const update: Positions_party_positions[] = [];
|
||||||
const add: Positions_party_positions[] = [];
|
const add: Positions_party_positions[] = [];
|
||||||
if (!gridRef.current) {
|
if (!gridRef.current?.api) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
const rowNode = gridRef.current.api.getRowNode(getRowNodeId(delta));
|
const rowNode = gridRef.current.api.getRowNode(getRowNodeId(delta));
|
||||||
|
Loading…
Reference in New Issue
Block a user