chore: minor refinemen

Follow https://github.com/sqlchat/sqlchat/pull/103
This commit is contained in:
Tianzhou Chen
2023-05-21 20:43:13 +08:00
parent 0285f86687
commit ed07ad61f0

View File

@ -96,8 +96,8 @@ const QueryDrawer = () => {
};
const close = () => {
if (originalStatement !== statement) {
messageStore.updateStatement(context?.messageId || "", originalStatement, statement);
if (originalStatement !== statement && context?.messageId) {
messageStore.updateStatement(context?.messageId, originalStatement, statement);
}
queryStore.toggleDrawer(false);
};