mirror of
https://github.com/lidarr/lidarr.git
synced 2025-07-16 10:03:51 -07:00
Fixed: Updates to commandExecutingSelector
This commit is contained in:
parent
68aaa49e9f
commit
e41f884153
16 changed files with 57 additions and 73 deletions
|
@ -1,12 +1,11 @@
|
|||
import { createSelector } from 'reselect';
|
||||
import { findCommand, isCommandExecuting } from 'Utilities/Command';
|
||||
import createCommandsSelector from './createCommandsSelector';
|
||||
import { isCommandExecuting } from 'Utilities/Command';
|
||||
import createCommandSelector from './createCommandSelector';
|
||||
|
||||
function createCommandExecutingSelector(name, contraints = {}) {
|
||||
return createSelector(
|
||||
createCommandsSelector(),
|
||||
(commands) => {
|
||||
const command = findCommand(commands, { name, ...contraints });
|
||||
createCommandSelector(name, contraints),
|
||||
(command) => {
|
||||
return isCommandExecuting(command);
|
||||
}
|
||||
);
|
||||
|
|
|
@ -6,7 +6,7 @@ function createCommandSelector(name, contraints = {}) {
|
|||
return createSelector(
|
||||
createCommandsSelector(),
|
||||
(commands) => {
|
||||
return !!findCommand(commands, { name, ...contraints });
|
||||
return findCommand(commands, { name, ...contraints });
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue