@@ -637,10 +637,11 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
637637 } ,
638638
639639 __getNextPageParams : function ( ) {
640- if ( this . _resourcesContainer . getFlatList ( ) && this . _resourcesContainer . getFlatList ( ) . nextRequest ) {
640+ const studiesContainer = this . _resourcesContainer . getFlatList ( ) ;
641+ if ( studiesContainer && studiesContainer . nextRequest ) {
641642 // Context might have been changed while waiting for the response.
642643 // The new call is on the way, therefore this response can be ignored.
643- const url = new URL ( this . _resourcesContainer . getFlatList ( ) . nextRequest ) ;
644+ const url = new URL ( studiesContainer . nextRequest ) ;
644645 const urlSearchParams = new URLSearchParams ( url . search ) ;
645646 const urlParams = { } ;
646647 for ( const [ snakeKey , value ] of urlSearchParams . entries ( ) ) {
@@ -650,12 +651,12 @@ qx.Class.define("osparc.dashboard.StudyBrowser", {
650651 const contextChanged = this . __didContextChange ( urlParams ) ;
651652 if (
652653 ! contextChanged &&
653- osparc . utils . Utils . hasParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "offset" ) &&
654- osparc . utils . Utils . hasParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "limit" )
654+ osparc . utils . Utils . hasParamFromURL ( studiesContainer . nextRequest , "offset" ) &&
655+ osparc . utils . Utils . hasParamFromURL ( studiesContainer . nextRequest , "limit" )
655656 ) {
656657 return {
657- offset : osparc . utils . Utils . getParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "offset" ) ,
658- limit : osparc . utils . Utils . getParamFromURL ( this . _resourcesContainer . getFlatList ( ) . nextRequest , "limit" )
658+ offset : osparc . utils . Utils . getParamFromURL ( studiesContainer . nextRequest , "offset" ) ,
659+ limit : osparc . utils . Utils . getParamFromURL ( studiesContainer . nextRequest , "limit" )
659660 } ;
660661 }
661662 }
0 commit comments