File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -578,20 +578,16 @@ export class Metadata {
578578 // so check both the dashed and snake versions
579579 // ie. 'creator-alt-script' is easier to access as 'creator_alt_script'
580580 const normalizedKey = key . replace ( / - / g, '_' ) ;
581- if ( normalizedKey === key ) {
582- return this . _valueFor ( key ) ;
583- } else {
584- return this . _valueFor ( normalizedKey ) ?? this . _valueFor ( key ) ;
585- }
581+ return this . _valueFor ( normalizedKey ) ?? this . _valueFor ( key ) ;
586582 }
587583
588584 @Memoize ( ) private _valueFor (
589585 key : string ,
590586 ) : MetadataFieldInterface < unknown > | undefined {
591- const value = this [ key as keyof Metadata ] as
587+ const field = this [ key as keyof Metadata ] as
592588 | MetadataFieldInterface < unknown >
593589 | undefined ;
594- if ( value ) return value ;
590+ if ( field ) return field ;
595591
596592 const rawValue = this . rawMetadata [ key ] ;
597593 if ( rawValue != null ) {
You can’t perform that action at this time.
0 commit comments