@@ -43,6 +43,8 @@ import { newLogEvent } from '@openscd/core/foundation/deprecated/history.js';
4343import packageJson from '../package.json' ;
4444import { CompasSclDataService } from './compas-services/CompasSclDataService.js' ;
4545
46+ const LNODE_LIB_DOC_ID = '3942f511-7d87-4482-bff9-056a98c6ce15' ;
47+
4648/** The `<open-scd>` custom element is the main entry point of the
4749 * Open Substation Configuration Designer. */
4850@customElement ( 'open-scd' )
@@ -129,9 +131,9 @@ export class OpenSCD extends LitElement {
129131 }
130132
131133 /** Loads the LNodeTypeDB.ssd document from the CompasSclDataService */
132- private async loadLibDoc ( e : CustomEvent ) : Promise < void > {
134+ private async loadLNodeLib ( e : CustomEvent ) : Promise < void > {
133135 const doc = await CompasSclDataService ( )
134- . getSclDocument ( this , 'SSD' , '3942f511-7d87-4482-bff9-056a98c6ce15' )
136+ . getSclDocument ( this , 'SSD' , LNODE_LIB_DOC_ID )
135137 . catch ( ( ) => null ) ;
136138 if ( doc instanceof Document ) {
137139 e . detail . callback ( doc ) ;
@@ -447,7 +449,7 @@ export class OpenSCD extends LitElement {
447449 validator : plugin . kind === 'validator' ,
448450 editor : plugin . kind === 'editor' ,
449451 } ) } "
450- @request-libdoc=${ ( e : CustomEvent ) => this . loadLibDoc ( e ) }
452+ @request-libdoc=${ ( e : CustomEvent ) => this . loadLNodeLib ( e ) }
451453 ></${ tag } >` ;
452454 } ,
453455 } ;
0 commit comments