1
0
mirror of https://github.com/DataTables/DataTables.git synced 2024-12-01 13:24:10 +01:00

Fix: Extending objects in the API could cause scope errors over multiple tables

- See thread 20075 for the original report

- Basically the issue here was that the object being used for the API
  extension on objects (e.g. `table.ajax` is an object) the object was
  not unique to each API instance, so it was being shared between
  instances and as a result, whatever instance was created last, would
  win!

- Fix is to use a new object each time.
This commit is contained in:
Allan Jardine 2014-03-24 15:16:32 +00:00
parent fedec2b479
commit c5058c36e6
2 changed files with 4 additions and 2 deletions

View File

@ -1 +1 @@
824641df1d8396a88c495ed258915287046c1c55
caffdb49eec87db2e3c1999eaec6736257b8f6b5

View File

@ -6756,6 +6756,8 @@
// Value
obj[ struct.name ] = typeof struct.val === 'function' ?
methodScoping( struct.val, struct ) :
$.isPlainObject( struct.val ) ?
{} :
struct.val;
obj[ struct.name ].__dt_wrapper = true;