Result of Array.prototype.includes erroneously enters conditional block
Reported by
jsw.jame...@gmail.com,
Jan 8 2018
|
|||||
Issue descriptionUserAgent: 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:
,
Jan 8 2018
,
Jan 10 2018
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...!!
,
Feb 8 2018
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 "[..]".
,
Feb 8 2018
Wow, very good catch, that would do it. Sorry for the misinformation.
,
Feb 8 2018
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
,
Feb 20 2018
|
|||||
►
Sign in to add a comment |
|||||
Comment 1 by dtapu...@chromium.org
, Jan 8 2018