Quantcast
Viewing all articles
Browse latest Browse all 82111

Low-level error in 1.9.4 _fnExtend?

In using jquery.lint, it flagged _fnExtend as passing an invalid argument list to $.extend. Specifically, argument 2 is null.
The code in question is in datatables 1.9.4 around line 4772
.
          if ( typeof oInit[prop] === 'object' && val !== null && $.isArray(val) === false )
          {
            $.extend( true, oOut[prop], val );
          }
          else
          {
            oOut[prop] = val;
          }

By inspection, it appears the test is incorrect: it should be checking typeof oOut[prop] === 'object' instead of checking oInit[prop]

When I changed the code from typeof oInit[prop] === 'object' to typeof oOut[prop] === 'object', the page did not appear to behave properly (nothing was emitted). When I changed the code to typeof oInit[prop] === 'object' && typeof oOut[prop] === 'object', the table appeared and the jquery.lint warning disappeared.

Viewing all articles
Browse latest Browse all 82111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>