Skip to content

Commit ddcd5fc

Browse files
authored
fix: store nsdocs correctly for descriptions (closes openscd#1605)
1 parent 9c5859e commit ddcd5fc

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

packages/openscd/src/foundation/nsdoc.ts

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,17 @@ export interface Nsdoc {
1010

1111
const [nsd72, nsd73, nsd74, nsd81] = await Promise.all([iec6185072, iec6185073, iec6185074, iec6185081]);
1212

13+
let nsdoc72: Document | undefined = undefined;
14+
let nsdoc73: Document | undefined = undefined;
15+
let nsdoc74: Document | undefined = undefined;
16+
let nsdoc81: Document | undefined = undefined;
17+
1318
/**
1419
* Initialize the full Nsdoc object.
1520
* @returns A fully initialized Nsdoc object for wizards/editors to use.
1621
*/
1722
export function initializeNsdoc(): Nsdoc {
18-
const [nsdoc72, nsdoc73, nsdoc74, nsdoc81] = [
23+
[nsdoc72, nsdoc73, nsdoc74, nsdoc81] = [
1924
localStorage.getItem('IEC 61850-7-2') ? new DOMParser().parseFromString(localStorage.getItem('IEC 61850-7-2')!, 'application/xml') : undefined,
2025
localStorage.getItem('IEC 61850-7-3') ? new DOMParser().parseFromString(localStorage.getItem('IEC 61850-7-3')!, 'application/xml') : undefined,
2126
localStorage.getItem('IEC 61850-7-4') ? new DOMParser().parseFromString(localStorage.getItem('IEC 61850-7-4')!, 'application/xml') : undefined,

0 commit comments

Comments
 (0)