Skip to content

Commit b2b2d0f

Browse files
committed
Fix sometimes crashing paint editor
1 parent a287c31 commit b2b2d0f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api/vm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -183,7 +183,7 @@ ScratchTools.Scratch.scratchPaint = function () {
183183
Object.keys(app).find((key) =>
184184
key.startsWith("__reactInternalInstance")
185185
)
186-
].child.stateNode.store.getState()?.scratchPaint || null
186+
].child.stateNode.store?.getState()?.scratchPaint || null
187187
);
188188
} else {
189189
return null;

0 commit comments

Comments
 (0)