tabledrag-ajax.js / Drupal.AjaxCommands.prototype.tabledragChanged - possible typo in the if statement

Created on 26 July 2023, over 1 year ago
Updated 16 August 2023, over 1 year ago

Problem/Motivation

A possible typo in the if statement. With "!==" different types are compared. Presumably, however, the content is to be compared with "!=". Furthermore, the documentation of the transfer parameter "status" is not correct ({number} [status] != 'success'). If this is how it is intended, then there is code that is never executed.

Steps to reproduce

File: core/misc/tabledrag-ajax.js

line: 11
 * @param {number} [status]
 *   The HTTP status code.
...
line: 20
 if (status !== 'success') {
    return;
  }

Proposed resolution

line: 11
 * @param {string} [status]
 *   The HTTP status.
...
line: 20
 if (status != 'success') {
    return;
  }

Remaining tasks

no

User interface changes

no

API changes

no

Data model changes

no

Release notes snippet

🐛 Bug report
Status

Needs work

Version

11.0 🔥

Component
Ajax 

Last updated about 10 hours ago

Created by

🇩🇪Germany fnalb2

Live updates comments and jobs are added and updated live.
  • JavaScript

    Affects the content, performance, or handling of Javascript.

Sign in to follow issues

Comments & Activities

Production build 0.71.5 2024