Skip to content

Commit 672e4a3

Browse files
committed
cache TopLevel::isMinified
1 parent 6099321 commit 672e4a3

File tree

1 file changed

+2
-0
lines changed
  • javascript/ql/lib/semmle/javascript

1 file changed

+2
-0
lines changed

javascript/ql/lib/semmle/javascript/AST.qll

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,9 @@ private predicate isAmbientTopLevel(TopLevel tl) {
207207
*/
208208
class TopLevel extends @toplevel, StmtContainer {
209209
/** Holds if this toplevel is minified. */
210+
cached
210211
predicate isMinified() {
212+
Stages::Ast::ref() and
211213
// file name contains 'min' (not as part of a longer word)
212214
getFile().getBaseName().regexpMatch(".*[^-._]*[-._]min([-._].*)?\\.\\w+")
213215
or

0 commit comments

Comments
 (0)