New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 799808 link

Starred by 2 users

Issue metadata

Status: WontFix
Owner: ----
Closed: Feb 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 2
Type: Bug



Sign in to add a comment

Result of Array.prototype.includes erroneously enters conditional block

Reported by jsw.jame...@gmail.com, Jan 8 2018

Issue description

UserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3239.84 Safari/537.36

Steps to reproduce the problem:
Watch video, notice how the array does include the string, the console confirms this, and the conditional block is entered anyways.

What is the expected behavior?
The conditional block should not be run if it already includes the string.

What went wrong?
Interpreter is ignoring the fact that a required conditional statement is false.

Did this work before? N/A 

Chrome version: 63.0.3239.84  Channel: n/a
OS Version: OS X 10.13.0
Flash Version:
 
array-includes.mov
6.8 MB Download
Components: -Blink Blink>JavaScript
Labels: Needs-Triage-M63
Cc: krajshree@chromium.org
Labels: Triaged-ET Needs-Feedback
Reporter@ - Thanks for filing the issue...!!

Could you please provide a sample test file to test the issue from TE-end.
This will help us in triaging the issue further.

Thanks...!!
it seems you made a typo. You wrote "!visitedPathNames.includes[pathName]" in your video. Then, "visitedPathNames.includes[pathName]" is undefined, and !undefined is true. Use parentheses "(..)", not brackets "[..]".
Wow, very good catch, that would do it. Sorry for the misinformation.
Project Member

Comment 6 by sheriffbot@chromium.org, Feb 8 2018

Labels: -Needs-Feedback
Thank you for providing more feedback. Adding requester "krajshree@chromium.org" to the cc list and removing "Needs-Feedback" label.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Status: WontFix (was: Unconfirmed)

Sign in to add a comment