Skip to content

Commit

Permalink
Fix mobxjs#3492: throw warning when use class component and suspense
Browse files Browse the repository at this point in the history
  • Loading branch information
SagaciousLittle committed Sep 5, 2022
1 parent f0e066f commit e08a6b6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/mobx-react/src/observerClass.ts
Expand Up @@ -142,7 +142,7 @@ function createReactiveRender(originalRender: any) {
let hasError = true
try {
setHiddenProp(this, isForcingUpdateKey, true)
if (!this[skipRenderKey]) {
if (!this[skipRenderKey] && this.updater.isMounted(this)) {
Component.prototype.forceUpdate.call(this)
}
hasError = false
Expand Down

0 comments on commit e08a6b6

Please sign in to comment.