Skip to content

Commit

Permalink
Web: JS: Fix retrieve from WS to return existing Promise if exists
Browse files Browse the repository at this point in the history
Since was not returning existing promise, was loading the data again for
each call while the retrieval was in progress.

Valid data was always shown.  This is a performance improvement.
  • Loading branch information
danjasuw committed May 15, 2024
1 parent 4262de1 commit fcbc301
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -694,7 +694,7 @@ export class CommonData_LoadedFromServer_SingleSearch__ReportedPeptideId_Based_D

// Return already in progress Promise

this._load_Num_PSM_Data_From_Num_PSMs_Webservice__InProgressPromise; // EARLY RETURN
return this._load_Num_PSM_Data_From_Num_PSMs_Webservice__InProgressPromise; // EARLY RETURN
}

const promise_load = this._load_Num_PSM_Data_From_Num_PSMs_Webservice_Actual();
Expand Down

0 comments on commit fcbc301

Please sign in to comment.