JS: Factor out some code

This commit is contained in:
Asger F
2025-11-17 10:48:15 +01:00
parent a405b7b3e0
commit 4b57b4418f

View File

@@ -6,10 +6,9 @@ private predicate isOverlay() { databaseMetadata("isOverlay", "true") }
overlay[local]
private string getFileFromEntity(@locatable node) {
exists(@location loc, @file file |
exists(@location loc |
hasLocation(node, loc) and
locations_default(loc, file, _, _, _, _) and
files(file, result)
result = getFileFromLocation(loc)
)
}