Skip to content

Commit

Permalink
avoid nulls in js config
Browse files Browse the repository at this point in the history
  • Loading branch information
jamesward committed Feb 21, 2022
1 parent e7f7fcc commit d39d6cb
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/main/java/org/webjars/RequireJS.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,10 @@ public static String generateSetupJavaScript(@Nonnull Collection<String> prefixe
// default to the new pom.xml meta-data way
ObjectNode webJarObjectNode = getWebJarSetupJson(webJar, prefixesWithVersion);
if ((webJarObjectNode != null ? webJarObjectNode.size() : 0) == 0) {
webJarConfigsString.append('\n').append(getWebJarConfig(webJar));
String legacyWebJarConfig = getWebJarConfig(webJar);
if (legacyWebJarConfig != null) {
webJarConfigsString.append('\n').append(legacyWebJarConfig);
}
} else {
requireJsConfigs.add(webJarObjectNode.toString());
}
Expand Down

0 comments on commit d39d6cb

Please sign in to comment.