Skip to content

Commit fcb54da

Browse files
committed
f5d08bd36e235d9596c94c72127e3c8ef58ba119 1.2.2 release
Sync to source repo @f5d08bd36e235d9596c94c72127e3c8ef58ba119
1 parent f4407af commit fcb54da

4 files changed

Lines changed: 25 additions & 18 deletions

File tree

datatables.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,5 @@
1515
],
1616
"src-repo": "http://github.com/DataTables/StateRestore",
1717
"last-tag": "1.2.1",
18-
"last-sync": "d0deb23d52682ed89c8c141e4a5c132b3ed378ed"
18+
"last-sync": "f5d08bd36e235d9596c94c72127e3c8ef58ba119"
1919
}

js/stateRestore.jqueryui.js

Lines changed: 23 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,29 +11,37 @@
1111
}
1212
else if ( typeof exports === 'object' ) {
1313
// CommonJS
14-
module.exports = function (root, $) {
15-
if ( ! root ) {
16-
// CommonJS environments without a window global must pass a
17-
// root. This will give an error otherwise
18-
root = window;
19-
}
20-
21-
if ( ! $ ) {
22-
$ = typeof window !== 'undefined' ? // jQuery's factory checks for a global window
23-
require('jquery') :
24-
require('jquery')( root );
25-
}
26-
14+
var jq = require('jquery');
15+
var cjsRequires = function (root, $) {
2716
if ( ! $.fn.dataTable ) {
2817
require('datatables.net-jqui')(root, $);
2918
}
3019

3120
if ( ! $.fn.dataTable.StateRestore ) {
3221
require('datatables.net-staterestore')(root, $);
3322
}
34-
35-
return factory( $, root, root.document );
3623
};
24+
25+
if (typeof window !== 'undefined') {
26+
module.exports = function (root, $) {
27+
if ( ! root ) {
28+
// CommonJS environments without a window global must pass a
29+
// root. This will give an error otherwise
30+
root = window;
31+
}
32+
33+
if ( ! $ ) {
34+
$ = jq( root );
35+
}
36+
37+
cjsRequires( root, $ );
38+
return factory( $, root, root.document );
39+
};
40+
}
41+
else {
42+
cjsRequires( window, jq );
43+
module.exports = factory( jq, window, window.document );
44+
}
3745
}
3846
else {
3947
// Browser

js/stateRestore.jqueryui.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.

js/stateRestore.jqueryui.mjs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import $ from 'jquery';
66
import DataTable from 'datatables.net-jqui';
77
import StateRestore from 'datatables.net-staterestore';
88

9-
109
$.extend(true, DataTable.StateRestoreCollection.classes, {
1110
checkBox: 'dtsr-check-box form-check-input',
1211
checkLabel: 'dtsr-check-label form-check-label',

0 commit comments

Comments
 (0)