Skip to content

Commit

Permalink
Fixed #1914 - Error while dynamic remove SplitterPanel component
Browse files Browse the repository at this point in the history
  • Loading branch information
tugcekucukoglu committed Dec 21, 2021
1 parent 517a0d7 commit 60ece4f
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/components/splitter/Splitter.vue
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
<template>
<div :class="containerClass">
<template v-for="(panel,i) of panels" :key="i" class="p-splitter-panel">
<component :is="panel"></component>
<div class="p-splitter-gutter" v-if="i !== (panels.length -1)" :style="gutterStyle"
<component :is="panel"></component>
<div class="p-splitter-gutter" v-if="i !== (panels.length -1)" :style="gutterStyle"
@mousedown="onGutterMouseDown($event, i)"
@touchstart="onGutterTouchStart($event, i)"
@touchmove="onGutterTouchMove($event, i)"
@touchend="onGutterTouchEnd($event, i)">
<div class="p-splitter-gutter-handle"></div>
</div>
<div class="p-splitter-gutter-handle"></div>
</div>
</template>
</div>
</template>
Expand Down Expand Up @@ -229,7 +229,7 @@ export default {
if (this.isSplitterPanel(child)) {
panels.push(child);
}
else if (child.children.length > 0) {
else if (child.children.length instanceof Array) {
child.children.forEach(nestedChild => {
if (this.isSplitterPanel(nestedChild)) {
panels.push(nestedChild)
Expand Down

0 comments on commit 60ece4f

Please sign in to comment.