Skip to content

Commit 0429d98

Browse files
committed
always check for editor after preprocessing
1 parent 4fd8c74 commit 0429d98

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

editor/src/main/java/io/github/projectunified/minigamecore/editor/EditorStatusDisplay.java

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,6 @@ public abstract class EditorStatusDisplay<B, S, T> {
7878
* @return the preprocessed object
7979
*/
8080
protected Object preprocessValue(Object value, Editor<?> editor) {
81-
while (value instanceof Editor<?>) {
82-
Editor<?> subEditor = (Editor<?>) value;
83-
value = subEditor.status();
84-
}
8581
return value;
8682
}
8783

@@ -105,6 +101,11 @@ public T display(Editor<?> editor) {
105101
continue;
106102
}
107103

104+
if (value instanceof Editor<?>) {
105+
Editor<?> subEditor = (Editor<?>) value;
106+
deque.addFirst(new Entry(level, entry.key(), subEditor.status(), false));
107+
}
108+
108109
S section = newSection(builder, level);
109110

110111
appendKey(section, entry.key(), entry.fromCollection());

0 commit comments

Comments
 (0)