Skip to content

Commit 74589f9

Browse files
committed
more flexible
1 parent 566a6fd commit 74589f9

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

services/static-webserver/client/source/class/osparc/study/StudyPricingUnits.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ qx.Class.define("osparc.study.StudyPricingUnits", {
2525
layout: new qx.ui.layout.VBox(5)
2626
});
2727

28-
this.__studyData = studyData;
29-
30-
this.__showPricingUnits();
28+
if (studyData) {
29+
this.setStudyData(studyData);
30+
}
3131
},
3232

3333
events: {
@@ -38,6 +38,11 @@ qx.Class.define("osparc.study.StudyPricingUnits", {
3838
members: {
3939
__studyData: null,
4040

41+
setStudyData: function(studyData) {
42+
this.__studyData = studyData;
43+
this.__showPricingUnits();
44+
},
45+
4146
__showPricingUnits: function() {
4247
const unitsLoading = () => this.fireEvent("loadingUnits");
4348
const unitsAdded = () => this.fireEvent("unitsReady");

0 commit comments

Comments
 (0)