Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix jQuery UI sortable plugin checks to be compatible with webpack #168

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions jquery.collection.js
Original file line number Diff line number Diff line change
Expand Up @@ -869,14 +869,14 @@
// drag & drop support: this is a bit more complex than pressing "up" or
// "down" buttons because we can move elements more than one place ahead
// or below...
if ((typeof jQuery.ui !== 'undefined' && typeof jQuery.ui.sortable !== 'undefined')
if ((typeof $.ui !== 'undefined' && typeof $.ui.sortable !== 'undefined')
&& collection.data('sortable')) {
collection.sortable('disable');
}
if (settings.drag_drop && settings.allow_up && settings.allow_down) {
var oldPosition;
var newPosition;
if (typeof jQuery.ui === 'undefined' || typeof jQuery.ui.sortable === 'undefined') {
if (typeof $.ui === 'undefined' || typeof $.ui.sortable === 'undefined') {
settings.drag_drop = false;
} else {
collection.sortable($.extend(true, {}, {
Expand Down