Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit ea3c2fb

Browse files
committed
add fix suggestion to qhelp of js/use-of-returnless-function
1 parent 64bcc10 commit ea3c2fb

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

javascript/ql/src/Statements/UseOfReturnlessFunction.qhelp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
<p>
77
JavaScript functions that do not return any value will implicitly return
88
<code>undefined</code>. Using the implicit return value from such a function
9-
is not an error in itself, but it is a pattern indicating that some
10-
misunderstanding has occurred.
9+
is not an error in itself, but it is a pattern indicating that some
10+
misunderstanding has occurred.
1111
</p>
1212

1313
</overview>
@@ -31,6 +31,12 @@ an error.
3131

3232
<sample src="examples/UseOfReturnlessFunction.js" />
3333

34+
<p>
35+
The program can be fixed either removing the use of the value returned by
36+
<code>renderText</code>, or by changing the <code>renderText</code> method
37+
to return a value.
38+
</p>
39+
3440
</example>
3541
<references>
3642
<li>Mozilla Developer Network: <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/return">Return</a>.</li>

0 commit comments

Comments
 (0)