Skip to content

Commit

Permalink
fixed #2396: don't always add p-splitter-panel-nested class (#2394)
Browse files Browse the repository at this point in the history
p-splitter-panel-nested class is always added no matter whether the panel element contains children with 'p-splitter' or not.
  • Loading branch information
stambata committed Nov 6, 2021
1 parent 9b1711e commit a6eb9cb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/components/splitter/Splitter.js
Expand Up @@ -215,7 +215,7 @@ export class Splitter extends Component {

componentDidMount() {
if (this.panelElement) {
if (this.panelElement.childNodes && DomHandler.find(this.panelElement, '.p-splitter')) {
if (this.panelElement.childNodes && DomHandler.find(this.panelElement, '.p-splitter').length) {
DomHandler.addClass(this.panelElement, 'p-splitter-panel-nested');
}
}
Expand Down

0 comments on commit a6eb9cb

Please sign in to comment.