File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -89,16 +89,14 @@ export const getElementData = (
89
89
return null ;
90
90
}
91
91
92
- const decl = ! element . declaration . module
92
+ const { name, module } = element . declaration ;
93
+ const decl = ! module
93
94
? manifest . modules
94
95
. flatMap ( ( x ) => x . declarations )
95
- . find (
96
- ( y ) : y is CustomElementDeclaration =>
97
- y ?. name === element . declaration . name
98
- )
96
+ . find ( ( y ) : y is CustomElementDeclaration => y ?. name === name )
99
97
: manifest . modules
100
- . find ( ( m ) => m . path === element . declaration . module . replace ( / ^ \/ / , '' ) )
101
- ?. declarations ?. find ( ( d ) => d . name === element . declaration . name ) ;
98
+ . find ( ( m ) => m . path === module . replace ( / ^ \/ / , '' ) )
99
+ ?. declarations ?. find ( ( d ) => d . name === name ) ;
102
100
103
101
if ( ! decl || ! isCustomElementDeclaration ( decl ) ) {
104
102
throw new Error ( `Could not find declaration for ${ selected } ` ) ;
You can’t perform that action at this time.
0 commit comments