This repository was archived by the owner on Nov 8, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +3
-5
lines changed
packages/api-elements/lib Expand file tree Collapse file tree 1 file changed +3
-5
lines changed Original file line number Diff line number Diff line change @@ -22,7 +22,7 @@ function hasTypeAttribute(e, attribute) {
2222 if ( undefined !== e . _attributes ) {
2323 const attrs = e . attributes . get ( 'typeAttributes' ) ;
2424 if ( undefined !== attrs && undefined !== attrs . content ) {
25- return undefined !== attrs . content . find ( attr => attr . content === attribute ) ;
25+ return attrs . content . some ( attr => attr . content === attribute ) ;
2626 }
2727 }
2828 return false ;
@@ -93,10 +93,8 @@ module.exports = (namespace) => {
9393 return undefined ;
9494 }
9595
96- // TODO e instanceof EnumElement fails because of dependency injection
97- // checking for e.element === 'enum' as a temporary walkaround
98- const isEnumElement = e => ( e . element === 'enum' || e instanceof EnumElement ) ;
99- const isPlural = e => ( e instanceof ArrayElement ) || ( e instanceof ObjectElement ) ;
96+ const isEnumElement = e => e instanceof EnumElement ;
97+ const isPlural = e => e instanceof ArrayElement ;
10098
10199 function mapValue ( e , options , f , elements ) {
102100 const opts = updateTypeAttributes ( e , options ) ;
You can’t perform that action at this time.
0 commit comments