Error using version 1.10.9

Error using version 1.10.9

measterbromeasterbro Posts: 33Questions: 9Answers: 0

I am getting the error "Object doesn't support property or method 'match'" when I use version 1.10.9. Version 1.10.7 works fine.

The code that is causing the error is:

$(document).ready(function () {
        var t = $('.table_id1').DataTable({
        });
    });

Answers

  • ThomDThomD Posts: 334Questions: 11Answers: 43

    Two things catch my eye: a class selector instead of an id selector - could be trouble if it isn't unique. Empty curly braces in the DataTable() call - I'd just leave them out.

  • measterbromeasterbro Posts: 33Questions: 9Answers: 0
    1. The table name is unique
    2. The empty curly brackets are only in my example, to make it easier to identify the problem.
    3. The error is being caused by "\DataTables-1.10.9\media\js\jquery.dataTables.min.js" at "return null===a?"0px":"number"==typeof a?0>a?"0px":a+"px":a.match(/\d$/)?a+"px"
  • jLinuxjLinux Posts: 981Questions: 73Answers: 75
    edited September 2015

    Can you replicate this on live.datatables.net ? If not, how about showing the full code (In a pastebin or something, to keep it clean here), and show us the console errors

  • allanallan Posts: 64,032Questions: 1Answers: 10,555 Site admin

    Agreed - we'd need a test page showing the issue so it can be debugged please. Either a link to your page or a specific example showing the issue.

    Thanks,
    Allan

  • measterbromeasterbro Posts: 33Questions: 9Answers: 0

    I am not able to consistently reproduce the error.

  • allanallan Posts: 64,032Questions: 1Answers: 10,555 Site admin

    Are you able to give a link to a page that sometimes shows the issue? Is it a timing thing? Sometimes it works and sometimes not?

  • allanallan Posts: 64,032Questions: 1Answers: 10,555 Site admin

    I think we've probably resolved this in your other thread on this topic which did include links now.

    Allan

This discussion has been closed.