# javascript:S2259 detection error

**URL:** <https://community.sonarsource.com/t/javascript-s2259-detection-error/37705>\
**Category:** Report False-positive / False-negative...\
**Tags:** javascript\
**Created:** [January 28, 2021, 9:33am UTC](https://community.sonarsource.com/t/javascript-s2259-detection-error/37705 "2021-01-28T09:33:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ruby\_Paasche](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ruby_paasche/32/14136_2.png) [@Ruby\_Paasche](https://community.sonarsource.com/u/Ruby_Paasche)\
**Post date:** [January 28, 2021, 9:33am UTC](https://community.sonarsource.com/t/javascript-s2259-detection-error/37705/1 "2021-01-28T09:33:10Z")

</div>

SonarQube Developer Edition Version 8.6 (build 39681)

 ![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/c/1/c17a297c8e9fd07f515424433c8cda83d3a332e4.png)

![image](https://europe1.discourse-cdn.com/sonarsource/uploads/sonarcommunity/original/3X/f/f/ff01d0a98902a83be68907e52fd0c7d3eff75700.png)

In both examples the variable is checked before.

---

<div class="post-metadata">

**Author:** ![Ruby\_Paasche](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/ruby_paasche/32/14136_2.png) [@Ruby\_Paasche](https://community.sonarsource.com/u/Ruby_Paasche)\
**Post date:** [March 23, 2021, 10:26am UTC](https://community.sonarsource.com/t/javascript-s2259-detection-error/37705/2 "2021-03-23T10:26:31Z")

</div>

Still an error in SonarQube 8.7

---

<div class="post-metadata">

**Author:** ![Colin](https://dub1.discourse-cdn.com/sonarsource/user_avatar/community.sonarsource.com/colin/32/55255_2.png) [@Colin](https://community.sonarsource.com/u/Colin)\
**Post date:** [March 23, 2021, 10:36am UTC](https://community.sonarsource.com/t/javascript-s2259-detection-error/37705/3 "2021-03-23T10:36:46Z")

</div>

Hey @Ruby_Paasche

Your report is a bit light in information. Can I suggest you look at the following post, and add more details?

> [@How to Report a False-positive / False-negative](https://community.sonarsource.com/t/how-to-report-a-false-positive/37022):
>
> Hey SonarSource Community! [False-positives happen](https://blog.sonarsource.com/false-positives-our-enemies-but-maybe-your-friends), as do false-negatives, and we’re eager to fix them. We are thrilled when our users report problems, so we can make our products better. What is a false-positive (FP)? A false-positive is when an issue is raised unexpectedly on code that should not trigger an issue, or where the suggested action doesn’t make any sense for the code. What is a false-negative (FN)? A false-negative is when an issue should be raised on a piece of code, but isn’t. …
