Application using dt-1.10.18 suddenly not working - cdn version changed?

Application using dt-1.10.18 suddenly not working - cdn version changed?

mgawinmgawin Posts: 1Questions: 1Answers: 0

Application I develop stopped working over weekend for us in all environments, without any change in code or other reason.
Custom rendering of column content defined as follows:

{
                data: "Our Header name", width: 80,
                "render": function (data, type, row, meta) {
                    return render_card(data, type, row, meta);
                }

throws now exception:

Uncaught TypeError: Cannot read property 'length' of undefined
    at render_card (card_render.js:3)
    at render ((index):322)
    at datatables.min.js:57
    at Object.b.fnGetData (datatables.min.js:51)
    at B (datatables.min.js:56)
    at Ha (datatables.min.js:64)
    at O (datatables.min.js:55)
    at e (datatables.min.js:131)
    at HTMLTableElement.<anonymous> (datatables.min.js:132)
    at Function.each (datatables.min.js:14)

because passed data variable is null.

We are using generated CDN lib file:
https://cdn.datatables.net/v/bs4-4.1.1/jq-3.3.1/jszip-2.5.0/dt-1.10.18/b-1.5.6/b-html5-1.5.6/fh-3.1.4/r-2.2.2/datatables.min.js

Is it possible that this file has changed??
Thanks in advance for any hints.

Answers

  • kthorngrenkthorngren Posts: 21,166Questions: 26Answers: 4,921
    edited October 2019

    at render_card (card_render.js:3)

    The error looks to be in the render_card() function.

    What does your render_card() function do? Is it using something like data.length?

    Are you expecting the data variable to be null? If not take a look at your source data to see if there is null data.

    Kevin

This discussion has been closed.