Issue #3416898: Replace String.prototype.indexOf('str') === -1 with String.prototype.includes('str') === false
3 unresolved threads
Closes #3416898
Merge request reports
Activity
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) { changed this line in version 3 of the diff
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) { changed this line in version 3 of the diff
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 ? '?' : '&'; changed this line in version 3 of the diff
added 1 commit
- 39064783 - 3416898-replace-string.prototype.indexofstr-: Removed explicit check.
Please register or sign in to reply