Skip to content

Commit 4255ae5

Browse files
authored
Merge pull request #1178 from RedisInsight/fe/bugfix/RI-3555_fix-wb-send-commands
#RI-3555 - fix wb commands execution
2 parents dadab33 + 0d04cbd commit 4255ae5

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

redisinsight/ui/src/components/query-card/QueryCardCliResult/QueryCardCliResult.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ const QueryCardCliResult = (props: Props) => {
3333
)
3434
}
3535

36-
export default QueryCardCliResult
36+
export default React.memo(QueryCardCliResult)

redisinsight/ui/src/pages/workbench/components/wb-view/WBViewWrapper.tsx

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -145,11 +145,16 @@ const WBViewWrapper = () => {
145145
) => {
146146
const { loading, batchSize } = state
147147
const isNewCommand = () => !commandId
148-
const commandsForExecuting = splitMonacoValuePerLines(removeMonacoComments(commandInit))
149-
.map((command) => removeMonacoComments(decode(command).trim()))
148+
const commandsForExecuting = without(
149+
splitMonacoValuePerLines(commandInit)
150+
.map((command) => removeMonacoComments(decode(command).trim())),
151+
''
152+
)
153+
150154
const [commands, ...rest] = chunk(commandsForExecuting, batchSize > 1 ? batchSize : 1)
151155
const multiCommands = rest.map((command) => getMultiCommands(command))
152-
if (!commands.length || loading) {
156+
157+
if (!commands?.length || loading) {
153158
setMultiCommands(multiCommands)
154159
return
155160
}

0 commit comments

Comments
 (0)