Skip to content

Commit

Permalink
Correcting bug when list is empty
Browse files Browse the repository at this point in the history
  • Loading branch information
pc-david\david.desmaisons committed Nov 1, 2016
1 parent 0aa0e10 commit 4c636a7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion dist/vuedraggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@
};
},
render: function render(h) {
if (this.$slots.default.length === 1) {
if (this.$slots.default && this.$slots.default.length === 1) {
var child = this.$slots.default[0];
if (child.componentOptions && child.componentOptions.tag === "transition-group") {
this.transitionMode = true;
Expand Down
2 changes: 1 addition & 1 deletion dist/vuedraggable.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "vuedraggable",
"version": "2.2.0",
"version": "2.3.1",
"description": "draggable component for vue",
"main": "dist/vuedraggable.js",
"files": [
Expand Down
2 changes: 1 addition & 1 deletion src/vuedraggable.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@
},

render (h) {
if (this.$slots.default.length===1) {
if (this.$slots.default && this.$slots.default.length===1) {
const child = this.$slots.default[0]
if (child.componentOptions && child.componentOptions.tag==="transition-group") {
this.transitionMode = true
Expand Down

0 comments on commit 4c636a7

Please sign in to comment.