File tree Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Expand file tree Collapse file tree 2 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -158,9 +158,10 @@ $(document).ready(function () {
158158 let instanceId = window . currentHyperionInstance ;
159159 const config = event . response . info ;
160160 const { instanceIds } = config ;
161- if ( instanceIds . length !== 0 ) {
161+
162+ if ( Array . isArray ( instanceIds ) && instanceIds . length !== 0 ) {
162163 if ( ! instanceIds . includes ( window . currentHyperionInstance ) ) {
163- // If instanceID is not valid try to switch to the first enabled or or fall back to the first instance configured
164+ // If instanceID is not valid try to switch to the first enabled or fall back to the first instance configured
164165 const { instances } = config ;
165166
166167 const firstEnabledInstanceId = instances . find ( ( instance ) => instance . enabled ) ?. id ;
@@ -170,7 +171,6 @@ $(document).ready(function () {
170171 } else {
171172 instanceId = window . currentHyperionInstance = instanceIds [ 0 ] ;
172173 }
173-
174174 }
175175 }
176176
Original file line number Diff line number Diff line change @@ -359,12 +359,12 @@ const requestServerConfig = {
359359 createFilter ( globalTypes = [ ] , instances = [ ] , instanceTypes = [ ] ) {
360360 const filter = {
361361 configFilter : {
362- global : { types : globalTypes } ,
362+ global : { types : globalTypes }
363363 } ,
364364 } ;
365365
366366 // Handle instances: remove "null" if present and add to filter if not empty
367- if ( instances . length && ! ( instances . length === 1 && instances [ 0 ] === null ) ) {
367+ if ( instances . length ) {
368368 filter . configFilter . instances = { ids : instances } ;
369369 }
370370
You can’t perform that action at this time.
0 commit comments