Skip to content

Commit d3d3fc2

Browse files
committed
JS: Use conjunction instead of if none()
1 parent 9d38a3a commit d3d3fc2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

javascript/ql/lib/semmle/javascript/Modules.qll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,10 +227,10 @@ abstract class Import extends AstNode {
227227
*/
228228
pragma[nomagic]
229229
final DataFlow::Node getImportedModuleNodeIfUnambiguous() {
230-
if
230+
result = this.getImportedModuleNode() and
231+
not (
231232
this.isDefaultImport() and
232233
this.getImportedModule().(ES2015Module).hasBothNamedAndDefaultExports()
233-
then none()
234-
else result = this.getImportedModuleNode()
234+
)
235235
}
236236
}

0 commit comments

Comments
 (0)