Skip to content

Commit 0d2af34

Browse files
committed
Merge master into feat/remove-survey
2 parents 2e52428 + 193a0d1 commit 0d2af34

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

src/components/SplitPane.jsx

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,14 @@ export class SplitPane extends Component {
1111
componentDidMount() {
1212
this.updateSplit();
1313
}
14-
componentDidUpdate(prevProps) {
15-
if (prevProps.direction !== this.props.direction) {
16-
if (this.splitInstance) {
17-
try {
18-
this.splitInstance.destroy();
19-
} catch (e) {
14+
componentWillUpdate() {
15+
if (this.splitInstance) {
16+
try {
17+
this.splitInstance.destroy();
18+
} catch (e) {
2019
// Ignore errors during destruction (e.g. if nodes are already removed)
2120
// This happens often with VDOM re-renders conflicting with Split.js DOM manipulation
22-
}
2321
}
24-
this.updateSplit();
2522
}
2623
}
2724
componentWillUnmount() {

0 commit comments

Comments
 (0)