Skip to content

Commit a2eaa03

Browse files
committed
Fix TextAreaSocketPreviewView after Optional Refactor
1 parent 6d13835 commit a2eaa03

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

ui/src/main/java/edu/wpi/grip/ui/preview/TextAreaSocketPreviewView.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ public TextAreaSocketPreviewView(EventBus eventBus, OutputSocket<T> socket) {
2424

2525
this.setStyle("-fx-pref-width: 20em;");
2626

27-
this.text = new TextArea(socket.getValue().toString());
27+
this.text = new TextArea(socket.getValue().orElse((T)"").toString());
2828
text.setEditable(false);
2929

3030
this.setContent(text);
@@ -35,7 +35,7 @@ public void onSocketChanged(SocketChangedEvent event) {
3535
final Socket socket = event.getSocket();
3636

3737
if (socket == this.getSocket()) {
38-
this.text.setText(socket.getValue().toString());
38+
this.text.setText(socket.getValue().orElse("").toString());
3939
}
4040
}
4141
}

0 commit comments

Comments
 (0)