File tree Expand file tree Collapse file tree 1 file changed +6
-4
lines changed
javascript/ql/src/semmle/javascript Expand file tree Collapse file tree 1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -129,6 +129,11 @@ module Closure {
129
129
container = result .getContainer ( )
130
130
}
131
131
132
+ pragma [ noinline]
133
+ private ClosureRequireCall getARequireInTopLevel ( ClosureModule m ) {
134
+ result .getTopLevel ( ) = m
135
+ }
136
+
132
137
/**
133
138
* A module using the Closure module system, declared using `goog.module()` or `goog.declareModuleId()`.
134
139
*/
@@ -146,10 +151,7 @@ module Closure {
146
151
string getClosureNamespace ( ) { result = getModuleDeclaration ( ) .getClosureNamespace ( ) }
147
152
148
153
override Module getAnImportedModule ( ) {
149
- exists ( ClosureRequireCall imprt |
150
- imprt .getTopLevel ( ) = this and
151
- result .( ClosureModule ) .getClosureNamespace ( ) = imprt .getClosureNamespace ( )
152
- )
154
+ result .( ClosureModule ) .getClosureNamespace ( ) = getARequireInTopLevel ( this ) .getClosureNamespace ( )
153
155
}
154
156
155
157
/**
You can’t perform that action at this time.
0 commit comments