Skip to content

Commit 7d4db6f

Browse files
require sortable on mounted only
1 parent eba8730 commit 7d4db6f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/vuedraggable.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
import { insertNodeAt, camelize, console, removeNode } from "./util/helper";
2-
const Sortable =
3-
typeof navigator !== "undefined" ? require("sortablejs").default : undefined;
42

53
function buildAttribute(object, propName, value) {
64
if (value === undefined) {
@@ -224,6 +222,7 @@ const draggableComponent = {
224222
}
225223
});
226224
!("draggable" in options) && (options.draggable = ">*");
225+
const Sortable = require("sortablejs").default;
227226
this._sortable = new Sortable(this.rootContainer, options);
228227
this.computeIndexes();
229228
},

0 commit comments

Comments
 (0)