File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
deps/rabbitmq_management/priv/www/js Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -179,8 +179,13 @@ dispatcher_add(function(sammy) {
179179 sammy . get ( '#/users/:id' , function ( ) {
180180 var vhosts = JSON . parse ( sync_get ( '/vhosts' ) ) ;
181181 const current_vhost = get_pref ( 'vhost' ) ;
182- let index_vhost = vhosts . findIndex ( v => v . name === current_vhost ) ;
183- index_vhost = index_vhost === - 1 ? 0 : index_vhost ;
182+ var index_vhost = 0 ;
183+ for ( var i = 0 ; i < vhosts . length ; i ++ ) {
184+ if ( vhosts [ i ] . name === current_vhost ) {
185+ index_vhost = i ;
186+ break ;
187+ }
188+ }
184189 render ( { 'user' : '/users/' + esc ( this . params [ 'id' ] ) ,
185190 'permissions' : '/users/' + esc ( this . params [ 'id' ] ) + '/permissions' ,
186191 'topic_permissions' : '/users/' + esc ( this . params [ 'id' ] ) + '/topic-permissions' ,
You can’t perform that action at this time.
0 commit comments