Skip to content

Commit d4814c1

Browse files
small refactor
1 parent 66b634a commit d4814c1

File tree

1 file changed

+2
-3
lines changed
  • redisinsight/ui/src/slices/browser

1 file changed

+2
-3
lines changed

redisinsight/ui/src/slices/browser/keys.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -503,7 +503,6 @@ export function setInitialStateByType(type: string) {
503503
}
504504
// Asynchronous thunk action
505505
export function fetchPatternKeysAction(
506-
scanThreshold: number,
507506
cursor: string,
508507
count: number,
509508
telemetryProperties: { [key: string]: any } = {},
@@ -520,6 +519,7 @@ export function fetchPatternKeysAction(
520519
sourceKeysFetch = CancelToken.source()
521520

522521
const state = stateInit()
522+
const scanThreshold = state.user.settings.config?.scanThreshold || SCAN_COUNT_DEFAULT;
523523
const { search: match, filter: type } = state.browser.keys
524524
const { encoding } = state.app.info
525525

@@ -1169,12 +1169,11 @@ export function fetchKeys(
11691169
) {
11701170
return async (dispatch: AppDispatch, stateInit: () => RootState) => {
11711171
const state = stateInit()
1172-
const scanThreshold = state.user.settings.config?.scanThreshold || SCAN_COUNT_DEFAULT;
11731172
const isRedisearchExists = isRedisearchAvailable(state.connections.instances.connectedInstance.modules)
11741173
const { searchMode, count, cursor, telemetryProperties } = options
11751174

11761175
return searchMode === SearchMode.Pattern || !isRedisearchExists
1177-
? dispatch<any>(fetchPatternKeysAction(scanThreshold, cursor, count, telemetryProperties, onSuccess, onFailed))
1176+
? dispatch<any>(fetchPatternKeysAction(cursor, count, telemetryProperties, onSuccess, onFailed))
11781177
: dispatch<any>(fetchRedisearchKeysAction(cursor, count, telemetryProperties, onSuccess, onFailed))
11791178
}
11801179
}

0 commit comments

Comments
 (0)