File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
apps/sim/app/workspace/[workspaceId]/providers Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -148,11 +148,11 @@ export function useRegisterGlobalCommands(commands: GlobalCommand[] | (() => Glo
148148 }
149149
150150 const commandsRef = useRef < GlobalCommand [ ] > ( [ ] )
151- commandsRef . current = typeof commands === 'function' ? commands ( ) : commands
151+ const list = typeof commands === 'function' ? commands ( ) : commands
152+ commandsRef . current = list
152153
153154 useEffect ( ( ) => {
154- const list = typeof commands === 'function' ? commands ( ) : commands
155- const wrappedCommands = list . map ( ( cmd ) => ( {
155+ const wrappedCommands = commandsRef . current . map ( ( cmd ) => ( {
156156 ...cmd ,
157157 handler : ( event : KeyboardEvent ) => {
158158 const currentCmd = commandsRef . current . find ( ( c ) => c . id === cmd . id )
You can’t perform that action at this time.
0 commit comments