Skip to content

Commit

Permalink
Fixed CompositePanel not returning promise on save.
Browse files Browse the repository at this point in the history
  • Loading branch information
barnettwilliam committed Dec 15, 2023
1 parent 92d27f5 commit 844db67
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions platform/src/CompositePanel.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,15 @@ class CompositePanel extends Panel {
* @override
*/
save(fileHandler){
this.childPanels.forEach( (cp) => {
if (cp.canSave()){
// Save each child panel
cp.save(fileHandler);
let savePromises = this.childPanels.map( (cp) => {
if (cp.canSave()) {
//save each child panel
return cp.save(fileHandler);
} else {
return null;
}
});
});
return Promise.all(savePromises);
}

addPanel(panel) {
Expand Down

0 comments on commit 844db67

Please sign in to comment.