mirror of
https://github.com/DataTables/DataTables.git
synced 2024-11-29 11:24:10 +01:00
Examples: When the node to show the XHR return is not available, don't try to use it
This commit is contained in:
parent
cc42c49ec3
commit
b6709c017b
12
examples/examples_support/syntax/js/shCore.js
vendored
12
examples/examples_support/syntax/js/shCore.js
vendored
@ -2698,11 +2698,13 @@ $(document).ready( function () {
|
||||
if ( $.fn.dataTableSettings.length >= 1 ) {
|
||||
$('#example').dataTable().bind('xhr', function ( e, oSettings ) {
|
||||
var n = document.getElementById('latest_xhr');
|
||||
n.innerHTML = JSON.stringify(
|
||||
JSON.parse(oSettings.jqXHR.responseText), null, 2
|
||||
);
|
||||
n.className = "brush: js;"
|
||||
SyntaxHighlighter.highlight({}, n);
|
||||
if ( n ) {
|
||||
n.innerHTML = JSON.stringify(
|
||||
JSON.parse(oSettings.jqXHR.responseText), null, 2
|
||||
);
|
||||
n.className = "brush: js;"
|
||||
SyntaxHighlighter.highlight({}, n);
|
||||
}
|
||||
} );
|
||||
}
|
||||
} );
|
Loading…
Reference in New Issue
Block a user