Skip to content

Commit

Permalink
minor bugfixes after define detection
Browse files Browse the repository at this point in the history
  • Loading branch information
m0rkeulv committed Jan 14, 2024
1 parent 7f1ae00 commit afd6d91
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ private Object lookupIdentifier(ASTNode identifier) throws CalculationException
String name = identifier.getText();
if (definitionMap.containsKey(name)) {
String value = definitionMap.get(name);
if (null == value) {
if (null == value || value.isEmpty()) {
return Boolean.TRUE;
} else {
return identifierValue(value);
Expand All @@ -421,7 +421,7 @@ private static Map<String, String> parseUserdataDefinitions(String userData) {
String possible = split.length > 0 ? split[0].replaceAll("-","_") : null;
String value = split.length > 1 ? split[1] : null;

definitionMap.put(split[0], value == null ? "" : value);
definitionMap.put(possible, value == null ? "" : value);
}
return definitionMap;
}
Expand Down

0 comments on commit afd6d91

Please sign in to comment.