@@ -101,12 +101,11 @@ export default class InspectDialog extends TabDialog<InspectInformationSection>
101101 * This will only be called once
102102 */
103103 protected override getSubpanels ( ) : InspectInformationSection [ ] {
104- const subpanels = informationSectionClasses . stream ( )
105- . merge ( this . DEBUG_TOOLS . modRegistryInspectDialogPanels . getRegistrations ( )
104+ const subpanels = informationSectionClasses
105+ . concat ( this . DEBUG_TOOLS . modRegistryInspectDialogPanels . getRegistrations ( )
106106 . map ( registration => registration . data ( InspectInformationSection ) ) )
107107 . map ( cls => new cls ( )
108- . event . subscribe ( "update" , this . update ) )
109- . toArray ( ) ;
108+ . event . subscribe ( "update" , this . update ) ) ;
110109
111110 // we're going to need the entity information section for some other stuff
112111 this . entityInfoSection = subpanels
@@ -126,13 +125,13 @@ export default class InspectDialog extends TabDialog<InspectInformationSection>
126125 protected override getSubpanelInformation ( subpanels : InspectInformationSection [ ] ) : SubpanelInformation [ ] {
127126 this . entityButtons = [ ] ;
128127
129- return this . subpanels . stream ( )
128+ return this . subpanels
130129 // add the tabs of the section to the tuple
131130 . map ( section => Tuple ( section , section . getTabs ( ) ) )
132131 // if there are no tabs from the section, remove it
133132 . filter ( ( [ , tabs ] ) => ! ! tabs . length )
134133 // map each of the section/tab tuples with an array of tuples representing all the subpanels (tabs) provided by that section
135- . map ( ( [ section , tabs ] ) => tabs
134+ . flatMap ( ( [ section , tabs ] ) => tabs
136135 // map each tab to the subpanel information for it
137136 . map ( ( [ index , getTabTranslation ] ) => Tuple (
138137 Text . toString ( getTabTranslation ) ,
@@ -142,11 +141,7 @@ export default class InspectDialog extends TabDialog<InspectInformationSection>
142141 . schedule ( section => this . onShowSubpanel ( section ) ( component ) ) ,
143142 // we cache all of the entity buttons
144143 ( button : Button ) => ! ( section instanceof EntityInformation ) ? undefined : this . entityButtons [ index ] = button ,
145- ) ) )
146- // currently we have an array of `SubpanelInformation` arrays, because each tab provided an array of them, fix with `flat`
147- . flatMap < SubpanelInformation > ( )
148- // and now return an array
149- . toArray ( ) ;
144+ ) ) ) ;
150145 }
151146
152147 public override getName ( ) : Translation {
0 commit comments