Skip to content

Commit 0831fa4

Browse files
authored
fix(Import IED): Fix order of edits (openscd#1698)
1 parent 1c457cf commit 0831fa4

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

packages/plugins/src/menu/ImportIEDs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -425,13 +425,13 @@ export default class ImportingIedPlugin extends LitElement {
425425

426426
const dataTypeTemplateActions = addDataTypeTemplates(ied, this.doc);
427427
const communicationActions = addCommunicationElements(ied, this.doc);
428-
const actions = communicationActions.concat(dataTypeTemplateActions);
429-
actions.push({
428+
const insertIed = {
430429
new: {
431430
parent: this.doc!.querySelector(':root')!,
432431
element: ied,
433432
},
434-
});
433+
};
434+
const actions = [ ...communicationActions, insertIed, ...dataTypeTemplateActions ];
435435

436436
this.dispatchEvent(
437437
newActionEvent({

0 commit comments

Comments
 (0)