Skip to content

Commit e4f23b3

Browse files
committed
JS: Add quotes around package name to correct parsing
1 parent 3592e76 commit e4f23b3

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

javascript/ql/lib/semmle/javascript/frameworks/data/ModelsAsData.qll

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,11 @@ module ModelExport<ModelExportSig S> {
108108
}
109109

110110
predicate exposedName(API::Node node, string type, string path) {
111-
node = API::moduleExport(type) and path = ""
111+
exists(string moduleName |
112+
node = API::moduleExport(moduleName) and
113+
path = "" and
114+
type = "'" + moduleName + "'"
115+
)
112116
}
113117

114118
predicate suggestedName(API::Node node, string type) {

0 commit comments

Comments
 (0)