Skip to content

Commit

Permalink
f1ef76c7cea1f30eacc5e01daf7729b9c69c8f78 Dev fix: div feature was t…
Browse files Browse the repository at this point in the history
…hrowing an error if no options given

Tests: Added for `div` feature

Sync to source repo @f1ef76c7cea1f30eacc5e01daf7729b9c69c8f78
  • Loading branch information
dtbuild committed Jul 11, 2024
1 parent 9eb3fc2 commit d5fd526
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion datatables.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,5 +11,5 @@
],
"src-repo": "http://github.com/DataTables/DataTablesSrc",
"last-tag": "2.0.8",
"last-sync": "51d9b85d178d40f373e7985ca538125cb19a95e4"
"last-sync": "f1ef76c7cea1f30eacc5e01daf7729b9c69c8f78"
}
10 changes: 6 additions & 4 deletions js/dataTables.js
Original file line number Diff line number Diff line change
Expand Up @@ -12844,10 +12844,12 @@
DataTable.feature.register( 'div', function ( settings, opts ) {
var n = $('<div>')[0];

_divProp(n, 'className', opts.className);
_divProp(n, 'id', opts.id);
_divProp(n, 'innerHTML', opts.html);
_divProp(n, 'textContent', opts.text);
if (opts) {
_divProp(n, 'className', opts.className);
_divProp(n, 'id', opts.id);
_divProp(n, 'innerHTML', opts.html);
_divProp(n, 'textContent', opts.text);
}

return n;
} );
Expand Down
2 changes: 1 addition & 1 deletion js/dataTables.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion js/dataTables.min.mjs

Large diffs are not rendered by default.

10 changes: 6 additions & 4 deletions js/dataTables.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -12791,10 +12791,12 @@ function _divProp(el, prop, val) {
DataTable.feature.register( 'div', function ( settings, opts ) {
var n = $('<div>')[0];

_divProp(n, 'className', opts.className);
_divProp(n, 'id', opts.id);
_divProp(n, 'innerHTML', opts.html);
_divProp(n, 'textContent', opts.text);
if (opts) {
_divProp(n, 'className', opts.className);
_divProp(n, 'id', opts.id);
_divProp(n, 'innerHTML', opts.html);
_divProp(n, 'textContent', opts.text);
}

return n;
} );
Expand Down

0 comments on commit d5fd526

Please sign in to comment.