fix "a.getRenderer is not a function" error in popups, use optional

chaining synthax
This commit is contained in:
HF 2023-03-16 16:21:01 +01:00
parent b7954ce11b
commit 7cee79f103

View File

@ -146,8 +146,8 @@ class SocketClient {
this.store.getState().canvas.canvasId, this.store.getState().canvas.canvasId,
)); ));
// register chunks // register chunks
const chunkids = this.getRenderer().recChunkIds; const chunkids = this.getRenderer?.().recChunkIds;
if (chunkids.length) { if (chunkids?.length) {
console.log(`Register ${chunkids.length} chunks`); console.log(`Register ${chunkids.length} chunks`);
this.send(dehydrateRegMChunks(chunkids)); this.send(dehydrateRegMChunks(chunkids));
} }