-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Closed
Description
Problem:
in version 1.9.0, i use angular-legacy-sortablejs by setting this on index.js (with webpack)
require('angular-legacy-sortablejs-maintained/angular-legacy-sortable.js');
after i update to 1.10.0 there is a error on console:
TypeError: Sortable.create is not a function
Then i find 1.10.0 is completely reconstructed.
in 1.9.0 :
(function sortableModule(factory) {
"use strict";
if (typeof define === "function" && define.amd) {
define(factory);
}
else if (typeof module != "undefined" && typeof module.exports != "undefined") {
module.exports = factory();
}
else {
/* jshint sub:true */
window["Sortable"] = factory();
}
})(...)
in 1.10.0 :
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = global || self, global.Sortable = factory());
}(this, function (){...})
and angular-legacy-sortablejs get sortablejs by this way:
(function (factory) {
'use strict';
if (typeof define === 'function' && define.amd) {
define(['angular', 'sortablejs'], factory);
}
else if (typeof require === 'function' && typeof exports === 'object' && typeof module === 'object') {
require('angular');
factory(angular, require('sortablejs'));
module.exports = 'ng-sortable';
}
else if (window.angular && window.Sortable) {
factory(angular, Sortable);
}
})(function (angular, Sortable) {...}
So can you think about adding some conditions so that sortablejs can continue to be used by angular-legacy-sortablejs
thank you !
Metadata
Metadata
Assignees
Labels
No labels