Skip to content

Commit 4c636a7

Browse files
author
pc-david\david.desmaisons
committed
Correcting bug when list is empty
1 parent 0aa0e10 commit 4c636a7

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

dist/vuedraggable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@
8888
};
8989
},
9090
render: function render(h) {
91-
if (this.$slots.default.length === 1) {
91+
if (this.$slots.default && this.$slots.default.length === 1) {
9292
var child = this.$slots.default[0];
9393
if (child.componentOptions && child.componentOptions.tag === "transition-group") {
9494
this.transitionMode = true;

dist/vuedraggable.min.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vuedraggable",
3-
"version": "2.2.0",
3+
"version": "2.3.1",
44
"description": "draggable component for vue",
55
"main": "dist/vuedraggable.js",
66
"files": [

src/vuedraggable.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
},
8080

8181
render (h) {
82-
if (this.$slots.default.length===1) {
82+
if (this.$slots.default && this.$slots.default.length===1) {
8383
const child = this.$slots.default[0]
8484
if (child.componentOptions && child.componentOptions.tag==="transition-group") {
8585
this.transitionMode = true

0 commit comments

Comments
 (0)