Commit ae3398a
tools: fix eslint isRequired
Currently the call can lead to a TypeError with the message:
`Cannot read property 'value' of undefined`.
This fixes it by first checking that the first argument is truthy.
PR-URL: #18729
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>1 parent 8e39c3b commit ae3398aCopy full SHA for ae3398a
File tree
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedOpen diff view settings
Filter options
- tools/eslint-rules
Expand file treeCollapse file tree
1 file changed
+1
-1
lines changedOpen diff view settings
Collapse file
tools/eslint-rules/rules-utils.js
Copy file name to clipboardExpand all lines: tools/eslint-rules/rules-utils.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
8 | 8 | |
9 | 9 | |
10 | 10 | |
11 | | - |
| 11 | + |
12 | 12 | |
13 | 13 | |
14 | 14 | |
|
0 commit comments