[javascript:S3800] FP when working on prototype function

Qube: Community 9.9

The Javascript rule S3800 reports a FP, when implementing a prototype function and returning this.

String.prototype.foo = function()
{
    if (this.length == 10)
        return this.substring(5);
    
    return this;
}