File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -109,22 +109,20 @@ class EditorRegistry implements IEditorRegistry {
109109 const matchingDescriptors : EditorDescriptor [ ] = [ ] ;
110110
111111 for ( const editor of this . editors ) {
112- const inputDescriptors = this . mapEditorToInputs . get ( editor ) ;
113- if ( inputDescriptors ) {
114- for ( const inputDescriptor of inputDescriptors ) {
115- const inputClass = inputDescriptor . ctor ;
116-
117- // Direct check on constructor type (ignores prototype chain)
118- if ( ! byInstanceOf && input . constructor === inputClass ) {
119- matchingDescriptors . push ( editor ) ;
120- break ;
121- }
122-
123- // Normal instanceof check
124- else if ( byInstanceOf && input instanceof inputClass ) {
125- matchingDescriptors . push ( editor ) ;
126- break ;
127- }
112+ const inputDescriptors = this . mapEditorToInputs . get ( editor ) || [ ] ;
113+ for ( const inputDescriptor of inputDescriptors ) {
114+ const inputClass = inputDescriptor . ctor ;
115+
116+ // Direct check on constructor type (ignores prototype chain)
117+ if ( ! byInstanceOf && input . constructor === inputClass ) {
118+ matchingDescriptors . push ( editor ) ;
119+ break ;
120+ }
121+
122+ // Normal instanceof check
123+ else if ( byInstanceOf && input instanceof inputClass ) {
124+ matchingDescriptors . push ( editor ) ;
125+ break ;
128126 }
129127 }
130128 }
You can’t perform that action at this time.
0 commit comments