Skip to content

Commit

Permalink
Fix JBang defined class Dev UI linking
Browse files Browse the repository at this point in the history
Fixes: #23001
  • Loading branch information
geoand committed Feb 7, 2022
1 parent 8532940 commit 8f7ea3d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ private List<String> sourcePackagesForRoot(Path langPath) {
}
}
if (rootPackages.isEmpty()) {
return Collections.emptyList();
return List.of("");
}
List<String> result = new ArrayList<>(rootPackages.size());
for (Path rootPackage : rootPackages) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
if (sourceMap.hasOwnProperty(key)) {
var packages = sourceMap[key];
for (var i = 0; i < packages.length; i++) {
if (className.startsWith(packages[i] + ".")) {
if (className.startsWith(packages[i] + ".") || ((packages[i] === "") && (className.indexOf('.') == -1))) {
return key;
}
}
Expand All @@ -183,7 +183,7 @@
if (sourceLocationMap.hasOwnProperty(key)) {
var packages = sourceLocationMap[key];
for (var i = 0; i < packages.length; i++) {
if (className.startsWith(packages[i] + ".")) {
if (className.startsWith(packages[i] + ".") || ((packages[i] === "") && (className.indexOf('.') == -1))) {
return key;
}
}
Expand Down

0 comments on commit 8f7ea3d

Please sign in to comment.