@@ -63,11 +63,11 @@ export class CompasSaveTo extends LitElement {
63
63
const docType = this . getSclTypeRadioGroup ( ) . getSelectedValue ( ) ?? '' ;
64
64
65
65
await CompasSclDataService ( ) . addSclDocument ( docType , { sclName : name , doc : doc } )
66
- . then ( xmlResponse => {
66
+ . then ( async xmlResponse => {
67
67
const id = Array . from ( xmlResponse . querySelectorAll ( '*|Id' ) ?? [ ] ) [ 0 ]
68
68
69
69
// Retrieve the document to fetch server-side updates.
70
- this . getSclDocument ( docType , id . textContent ?? '' ) ;
70
+ await this . getSclDocument ( docType , id . textContent ?? '' ) ;
71
71
72
72
const openScd = getOpenScdElement ( ) ;
73
73
openScd . dispatchEvent (
@@ -93,15 +93,16 @@ export class CompasSaveTo extends LitElement {
93
93
const docType = getTypeFromDocName ( docName ) ;
94
94
95
95
await CompasSclDataService ( ) . updateSclDocument ( docType . toUpperCase ( ) , docId , { changeSet : changeSet ! , doc : doc } )
96
- . then ( ( ) => {
96
+ . then ( async ( ) => {
97
97
// Retrieve the document to fetch server-side updates.
98
- this . getSclDocument ( docType , docId ) ;
98
+ await this . getSclDocument ( docType , docId ) ;
99
99
100
100
const openScd = getOpenScdElement ( ) ;
101
101
openScd . dispatchEvent (
102
102
newLogEvent ( {
103
103
kind : 'info' ,
104
- title : get ( 'compas.saveTo.updateSuccess' ) } ) ) ;
104
+ title : get ( 'compas.saveTo.updateSuccess' )
105
+ } ) ) ;
105
106
106
107
// Close the Save Dialog.
107
108
openScd . dispatchEvent ( newWizardEvent ( ) ) ;
0 commit comments