Skip to content

Commit 17becfb

Browse files
committed
fix: remove null check for scnee
1 parent 3336504 commit 17becfb

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

jabgui/src/main/java/org/jabref/gui/ai/components/aichat/chatmessage/ChatMessageComponent.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@ private void loadChatMessage() {
9696
}
9797

9898
default ->
99-
LOGGER.error("ChatMessageComponent supports only user, AI, or error messages, but other type was passed: {}", chatMessage.get().type().name());
99+
LOGGER.error("ChatMessageComponent supports only user, AI, or error messages, but other type was passed: {}", chatMessage.get().type().name());
100100
}
101101
}
102102

@@ -107,7 +107,7 @@ private void initialize() {
107107
markdownContentPane.getChildren().add(markdownTextFlow);
108108
markdownContentPane.minHeightProperty().bind(markdownTextFlow.heightProperty());
109109
markdownContentPane.prefHeightProperty().bind(markdownTextFlow.heightProperty());
110-
NumberBinding maxUsableWidth = Bindings.createDoubleBinding(() -> getScene() == null ? 600 : getScene().getWidth() - 20, sceneProperty(), getScene() == null ? widthProperty() : getScene().widthProperty());
110+
NumberBinding maxUsableWidth = Bindings.createDoubleBinding(() -> getScene().getWidth() - 20, sceneProperty(), getScene().widthProperty());
111111
markdownTextFlow.maxWidthProperty().bind(maxUsableWidth);
112112
wrapperHBox.maxWidthProperty().bind(maxUsableWidth);
113113
setMaxWidth(Double.MAX_VALUE);

0 commit comments

Comments
 (0)