Closed Bug 1561750 Opened 5 years ago Closed 5 years ago

Convert foo.indexOf(...) > to foo.includes(...)

Categories

(Thunderbird :: General, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED
Thunderbird 69.0

People

(Reporter: iannbugzilla, Assigned: iannbugzilla)

Details

Attachments

(1 file)

Spotted two files where it might be possible to use foo.includes() instead of foo.indexOf()
See bug 1207363 and bug 1339461 for more information.

Attached patch Use includes()Splinter Review

For the changes in mail/base/content/msgMail3PaneWindow.js from reading the code it seems to be looking for those headers so not sure why finding them at position zero was invalid.

Attachment #9074369 - Flags: review?(jorgk)

(In reply to Ian Neal from comment #1)

For the changes in mail/base/content/msgMail3PaneWindow.js from reading the code it seems to be looking for those headers so not sure why finding them at position zero was invalid.

Very strange, I guess they never occurred at position 0.

Comment on attachment 9074369 [details] [diff] [review]
Use includes()

Thanks, I'll land it later, if you don't mind.
Attachment #9074369 - Flags: review?(jorgk) → review+

Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/ca15c222cd1e
Convert three 'foo.indexOf(...) >' to 'foo.includes(...)'. r=jorgk DONTBUILD

Status: ASSIGNED → RESOLVED
Closed: 5 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 69.0
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: