@@ -631,16 +631,18 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
631631 // check the entries in currentParams are the same as the reqParams
632632 let sameContext = true ;
633633 Object . entries ( currentParams ) . forEach ( ( [ key , value ] ) => {
634- sameContext &= key in reqParams && reqParams [ key ] === value ;
634+ // loose equality: will do a Number to String conversion if necessary
635+ sameContext &= key in reqParams && reqParams [ key ] == value ;
635636 } ) ;
636637 return ! sameContext ;
637638 } ,
638639
639640 __getNextPageParams : function ( ) {
640- if ( this . _resourcesContainer . getFlatList ( ) && this . _resourcesContainer . getFlatList ( ) . nextRequest ) {
641+ const studiesContainer = this . _resourcesContainer . getFlatList ( ) ;
642+ if ( studiesContainer && studiesContainer . nextRequest ) {
641643 // Context might have been changed while waiting for the response.
642644 // The new call is on the way, therefore this response can be ignored.
643- const url = new URL ( this . _resourcesContainer . getFlatList ( ) . nextRequest ) ;
645+ const url = new URL ( studiesContainer . nextRequest ) ;
644646 const urlSearchParams = new URLSearchParams ( url . search ) ;
645647 const urlParams = { } ;
646648 for ( const [ snakeKey , value ] of urlSearchParams . entries ( ) ) {
@@ -650,12 +652,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
650652 const contextChanged = this . __didContextChange ( urlParams ) ;
651653 if (
652654 ! contextChanged &&
653- osparc . utils . Utils . hasParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "offset" ) &&
654- osparc . utils . Utils . hasParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "limit" )
655+ osparc . utils . Utils . hasParamFromURL ( studiesContainer . nextRequest , "offset" ) &&
656+ osparc . utils . Utils . hasParamFromURL ( studiesContainer . nextRequest , "limit" )
655657 ) {
656658 return {
657- offset : osparc . utils . Utils . getParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "offset" ) ,
658- limit : osparc . utils . Utils . getParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "limit" )
659+ offset : osparc . utils . Utils . getParamFromURL ( studiesContainer . nextRequest , "offset" ) ,
660+ limit : osparc . utils . Utils . getParamFromURL ( studiesContainer . nextRequest , "limit" )
659661 } ;
660662 }
661663 }
0 commit comments