Skip to content

Commit

Permalink
extra fix highest/lowest tags
Browse files Browse the repository at this point in the history
  • Loading branch information
mcmonkey4eva committed May 19, 2020
1 parent 9c51e33 commit b1c206e
Showing 1 changed file with 4 additions and 2 deletions.
Expand Up @@ -1334,6 +1334,7 @@ else if (index.equalsIgnoreCase("first")) {
ObjectTag lowestObj = null;
BigDecimal lowest = null;
for (ObjectTag obj : object.objectForms) {
ObjectTag actualObj = obj;
if (tag != null) {
obj = CoreUtilities.autoAttribTyped(obj, new Attribute(tag, attribute.getScriptEntry(), attribute.context));
}
Expand All @@ -1342,7 +1343,7 @@ else if (index.equalsIgnoreCase("first")) {
BigDecimal val = new ElementTag(str).asBigDecimal();
if (lowest == null || lowest.compareTo(val) > 0) {
lowest = val;
lowestObj = obj;
lowestObj = actualObj;
}
}
}
Expand All @@ -1366,6 +1367,7 @@ else if (index.equalsIgnoreCase("first")) {
ObjectTag highestObj = null;
BigDecimal highest = null;
for (ObjectTag obj : object.objectForms) {
ObjectTag actualObj = obj;
if (tag != null) {
obj = CoreUtilities.autoAttribTyped(obj, new Attribute(tag, attribute.getScriptEntry(), attribute.context));
}
Expand All @@ -1374,7 +1376,7 @@ else if (index.equalsIgnoreCase("first")) {
BigDecimal val = new ElementTag(str).asBigDecimal();
if (highest == null || highest.compareTo(val) < 0) {
highest = val;
highestObj = obj;
highestObj = actualObj;
}
}
}
Expand Down

0 comments on commit b1c206e

Please sign in to comment.