Skip to content
This repository was archived by the owner on Dec 19, 2023. It is now read-only.

Commit 1942feb

Browse files
authored
Merge pull request #881 from velo/newer_altair
fix(altair): Made possible to use newer versions of altair over cdn
2 parents 6d3215d + e1b719b commit 1942feb

File tree

1 file changed

+3
-1
lines changed
  • graphql-spring-boot-autoconfigure/src/main/java/graphql/kickstart/autoconfigure/editor/altair

1 file changed

+3
-1
lines changed

graphql-spring-boot-autoconfigure/src/main/java/graphql/kickstart/autoconfigure/editor/altair/AltairController.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,9 @@ private Map<String, String> getReplacements() {
8686
private boolean isJsSuffixAdded() {
8787
if (nonNull(altairProperties.getCdn().getVersion())) {
8888
String[] versionValues = altairProperties.getCdn().getVersion().split("\\.");
89-
return isNumeric(versionValues[0]) && parseInt(versionValues[0]) >= 4;
89+
return isNumeric(versionValues[0]) && parseInt(versionValues[0]) >= 4
90+
// -es2018 version is not published for versions 4.2.0 onwards
91+
&& versionValues.length > 2 && isNumeric(versionValues[1]) && parseInt(versionValues[1]) < 2;
9092
}
9193
return false;
9294
}

0 commit comments

Comments
 (0)