@@ -124,7 +124,7 @@ class App extends Component<AppProps, AppState> {
124124 themeKey : undefined ,
125125 layout : 'large' ,
126126 docsData : null ,
127- versionsData : null ,
127+ versionsData : undefined ,
128128 iconsData : null
129129 }
130130 }
@@ -165,34 +165,6 @@ class App extends Component<AppProps, AppState> {
165165 }
166166 }
167167
168- /**
169- * Get every static prop from an object (inherited ones too)
170- * @param object The object to check
171- * @returns {Set<string> } the properties
172- */
173- getAllPropNames ( object : Record < string , any > ) {
174- let obj : object | null = object
175- const props : Set < string > = new Set ( )
176- // exclude some common static props for performance
177- const invalidKeys = [
178- '$$typeof' ,
179- 'render' ,
180- 'propTypes' ,
181- 'selector' ,
182- 'defaultProps' ,
183- 'displayName' ,
184- 'generateComponentTheme'
185- ]
186- while ( obj ) {
187- const keys = Object . keys ( obj )
188- keys . forEach ( ( k ) => {
189- if ( ! invalidKeys . includes ( k ) ) props . add ( k )
190- } )
191- obj = Reflect . getPrototypeOf ( obj )
192- }
193- return props
194- }
195-
196168 componentDidMount ( ) {
197169 this . _defaultDocumentTitle = document . title
198170 this . updateKey ( )
@@ -416,7 +388,7 @@ class App extends Component<AppProps, AppState> {
416388 < Heading level = "h1" as = "h2" margin = "0 0 medium" >
417389 Icons
418390 </ Heading >
419- < IconsPage glyphs = { iconsData . glyphs } />
391+ < IconsPage glyphs = { iconsData ! . glyphs } />
420392 </ View >
421393 )
422394
@@ -453,9 +425,9 @@ class App extends Component<AppProps, AppState> {
453425 const { themes } = this . state . docsData !
454426 const { layout, themeKey, versionsData } = this . state
455427 const { olderVersionsGitBranchMap } = versionsData || { }
456- let legacyGitBranch
428+ let legacyGitBranch : string | undefined = undefined
457429
458- if ( olderVersionsGitBranchMap ) {
430+ if ( olderVersionsGitBranchMap && versionInPath ) {
459431 legacyGitBranch = olderVersionsGitBranchMap [ versionInPath ]
460432 }
461433
0 commit comments