Skip to content

Commit 527d6c8

Browse files
committed
fix(View): conditionally set current renderer
The current renderer should only be set if the container exists (which implies that the renderer is not deleted.)
1 parent a2ec8e2 commit 527d6c8

File tree

2 files changed

+1
-1
lines changed

2 files changed

+1
-1
lines changed

src/core/View.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -215,7 +215,6 @@ export default class View extends Component {
215215
};
216216
this.onEnter = () => {
217217
this.hasFocus = true;
218-
this.interactor.setCurrentRenderer(this.renderer);
219218
};
220219
this.onLeave = () => {
221220
this.hasFocus = false;

src/core/ViewContainer.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ class ViewController extends Component {
122122
const container = view?.containerRef.current;
123123
if (this.props.root && container) {
124124
this.bindInteractorEvents(container);
125+
this.interactor.setCurrentRenderer(this.renderer);
125126
this.interactor.setInteractorStyle(view.style);
126127
}
127128
}

0 commit comments

Comments
 (0)