Skip to content

Commit 539c302

Browse files
authored
Merge pull request #897 from rgantzos/main
Fix sometimes crashing paint editor
2 parents f10839d + b2b2d0f commit 539c302

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)