File tree Expand file tree Collapse file tree 1 file changed +15
-2
lines changed
Expand file tree Collapse file tree 1 file changed +15
-2
lines changed Original file line number Diff line number Diff line change @@ -55,8 +55,8 @@ export function WebsocketApiTool() {
5555 const getInitialMethod = ( ) : CommandMethod => {
5656 for ( const group of ( commandList as CommandGroup [ ] ) ) {
5757 for ( const method of group . methods ) {
58- if ( slug . slice ( 1 ) === slugify ( method . name ) || params . req ?. command == method . body . command ) {
59- return method ;
58+ if ( params . req ?. command = == method . body . command ) {
59+ return method
6060 }
6161 }
6262 }
@@ -74,6 +74,19 @@ export function WebsocketApiTool() {
7474 ) ;
7575 streamPausedRef . current = streamPaused ;
7676
77+ useEffect ( ( ) => {
78+ if ( slug ) {
79+ for ( const group of ( commandList as CommandGroup [ ] ) ) {
80+ for ( const method of group . methods ) {
81+ if ( slug . slice ( 1 ) === slugify ( method . name ) ) {
82+ setMethod ( method )
83+ return
84+ }
85+ }
86+ }
87+ }
88+ } , [ slug ] )
89+
7790 const handleCurrentBodyChange = ( value : any ) => {
7891 setCurrentBody ( value ) ;
7992 } ;
You can’t perform that action at this time.
0 commit comments