mirror of
https://github.com/DataTables/DataTables.git
synced 2025-01-30 23:52:11 +01:00
Fixed: Add a sanity check to ensure that the node given to DataTables is in fact a table - 2343
This commit is contained in:
parent
351218c473
commit
2315bf3635
@ -28,7 +28,6 @@
|
|||||||
|
|
||||||
<h1>Live example</h1>
|
<h1>Live example</h1>
|
||||||
<div id="demo">
|
<div id="demo">
|
||||||
<div id="me"></div>
|
|
||||||
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
<table cellpadding="0" cellspacing="0" border="0" class="display" id="example">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
|
8
media/js/jquery.dataTables.js
vendored
8
media/js/jquery.dataTables.js
vendored
@ -6293,6 +6293,14 @@
|
|||||||
oSettings.sInstance = _oExt._oExternConfig.iNextUnique ++;
|
oSettings.sInstance = _oExt._oExternConfig.iNextUnique ++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Sanity check */
|
||||||
|
if ( this.nodeName.toLowerCase() != 'table' )
|
||||||
|
{
|
||||||
|
_fnLog( oSettings, 0, "Attempted to initialise DataTables on a node which is not a "+
|
||||||
|
"table: "+this.nodeName );
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
/* Store 'this' in the settings object for later retrieval */
|
/* Store 'this' in the settings object for later retrieval */
|
||||||
oSettings.oInstance = _that;
|
oSettings.oInstance = _that;
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user