Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Add defensive coding in tabledrag.js #6968

@laryn

Description

@laryn

I am doing some custom JS work to rearrange a particular page and am running into a case where it breaks the Tabledrag functionality due to a failure to have some defensive coding (it assumes a result for cell[0] and breaks if it doesn't exist).

Uncaught TypeError: can't access property "colSpan", cell[0] is undefined

This issue seems also to have been reported in modern Drupal as well.

I don't have STR because my use is atypical -- but I propose some minor defensive coding, taken from the patch offered in that Drupal queue, to prevent the JS from crashing in edge cases like mine.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions