Skip to content

Commit d19e2af

Browse files
author
Dennis Labordus
authored
Merge pull request #49 from com-pas/load-cursor
Small fix for loading progress icon.
2 parents 97e6202 + 93e6758 commit d19e2af

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

src/compas/CompasSaveTo.ts

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,11 @@ export class CompasSaveTo extends LitElement {
6363
const docType = this.getSclTypeRadioGroup().getSelectedValue() ?? '';
6464

6565
await CompasSclDataService().addSclDocument(docType, {sclName: name, doc: doc})
66-
.then(xmlResponse => {
66+
.then(async xmlResponse => {
6767
const id = Array.from(xmlResponse.querySelectorAll('*|Id') ?? [])[0]
6868

6969
// Retrieve the document to fetch server-side updates.
70-
this.getSclDocument(docType, id.textContent ?? '');
70+
await this.getSclDocument(docType, id.textContent ?? '');
7171

7272
const openScd = getOpenScdElement();
7373
openScd.dispatchEvent(
@@ -93,15 +93,16 @@ export class CompasSaveTo extends LitElement {
9393
const docType = getTypeFromDocName(docName);
9494

9595
await CompasSclDataService().updateSclDocument(docType.toUpperCase(), docId, {changeSet: changeSet!, doc: doc})
96-
.then(() => {
96+
.then(async () => {
9797
// Retrieve the document to fetch server-side updates.
98-
this.getSclDocument(docType, docId);
98+
await this.getSclDocument(docType, docId);
9999

100100
const openScd = getOpenScdElement();
101101
openScd.dispatchEvent(
102102
newLogEvent({
103103
kind: 'info',
104-
title: get('compas.saveTo.updateSuccess')}));
104+
title: get('compas.saveTo.updateSuccess')
105+
}));
105106

106107
// Close the Save Dialog.
107108
openScd.dispatchEvent(newWizardEvent());

0 commit comments

Comments
 (0)