Fix enum plugin to be standard compatible

The word `enum` is is a reserved JavaScript word and form
$.fn.dataTable.enum broke at least YuiCompressor minification
pull/282/head
Oskari Porkka 9 years ago
parent 4ef99e1023
commit 0ff5d1edde

@ -24,7 +24,9 @@
var unique = 0;
var types = $.fn.dataTable.ext.type;
$.fn.dataTable.enum = function ( arr ) {
// Using form $.fn.dataTable.enum breaks at least YuiCompressor since enum is
// a reserved word in JavaScript
$.fn.dataTable['enum'] = function ( arr ) {
var name = 'enum-'+(unique++);
var lookup = window.Map ? new Map() : {};

Loading…
Cancel
Save