File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed
Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change 3838 rscriptTypeMasked = / ^ t r u e \/ ( .* ) / ,
3939 rcleanScript = / ^ \s * < ! (?: \[ C D A T A \[ | - - ) | (?: \] \] | - - ) > \s * $ / g;
4040
41+ // Manipulating tables requires a tbody
4142function manipulationTarget ( elem , content ) {
42- if ( jQuery . nodeName ( elem , "table" ) &&
43- jQuery . nodeName ( content . nodeType !== 11 ? content : content . firstChild , "tr" ) ) {
43+ return jQuery . nodeName ( elem , "table" ) &&
44+ jQuery . nodeName ( content . nodeType !== 11 ? content : content . firstChild , "tr" ) ?
4445
45- return elem . getElementsByTagName ( "tbody" ) [ 0 ] || elem ;
46- }
47-
48- return elem ;
46+ elem . getElementsByTagName ( "tbody" ) [ 0 ] ||
47+ elem . appendChild ( elem . ownerDocument . createElement ( "tbody" ) ) :
48+ elem ;
4949}
5050
5151// Replace/restore the type attribute of script elements for safe DOM manipulation
You can’t perform that action at this time.
0 commit comments