Skip to content
Snippets Groups Projects

Issue #3416898: Replace String.prototype.indexOf('str') === -1 with String.prototype.includes('str') === false

Open Issue #3416898: Replace String.prototype.indexOf('str') === -1 with String.prototype.includes('str') === false
3 unresolved threads
3 unresolved threads

Closes #3416898

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
619 619
620 620 // Ensure that we have a valid URL by adding ? when no query parameter is
621 621 // yet available, otherwise append using &.
622 if (ajax.options.url.indexOf('?') === -1) {
622 if (ajax.options.url.includes('?') === false) {
  • 125 125 // When doing a post request, you need non-null data. Otherwise a
    126 126 // HTTP 411 or HTTP 406 (with Apache mod_security) error may result.
    127 127 let uri = this.uri;
    128 if (uri.indexOf('?') === -1) {
    128 if (uri.includes('?') === false) {
  • 104 104 )}`;
    105 105 $contextual.find('.contextual-links a').each(function () {
    106 106 const url = this.getAttribute('href');
    107 const glue = url.indexOf('?') === -1 ? '?' : '&';
    107 const glue = url.includes('?') === false ? '?' : '&';
  • Tirupati Singh added 1 commit

    added 1 commit

    • 39064783 - 3416898-replace-string.prototype.indexofstr-: Removed explicit check.

    Compare with previous version

  • Please register or sign in to reply
    Loading