improved code related to tag condition

This commit is contained in:
Stephan Richter
2020-11-01 18:58:00 +01:00
parent 0decce654d
commit efe93ff448
9 changed files with 28 additions and 24 deletions

View File

@@ -74,8 +74,9 @@ public class ConditionalAction extends Action {
super.load(json);
for (Object o : json.getJSONArray(CONDITIONS)) {
if (o instanceof JSONObject) {
Condition condition = Condition.load((JSONObject)o);
if (condition != null) conditions.add(condition);
JSONObject j = (JSONObject) o;
Condition condition = Condition.create(j.getString(TYPE));
if (condition != null) conditions.add(condition.load(j));
}
}
actions = ActionList.load(json.getJSONArray(ACTIONS));