File tree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed
src/components/B4ACodeTree Expand file tree Collapse file tree 1 file changed +9
-1
lines changed Original file line number Diff line number Diff line change @@ -244,7 +244,7 @@ export default class B4ACodeTree extends React.Component {
244
244
title = { typeof this . state . selectedFile === 'string' ? this . state . selectedFile : this . state . selectedFile . name }
245
245
description = { this . state . source } /> : < div > </ div > ;
246
246
}
247
- else {
247
+ else if ( this . state . selectedFile ) {
248
248
content = < div className = { `${ styles [ 'files-box' ] } ` } >
249
249
< div className = { styles [ 'files-header' ] } >
250
250
< p > { typeof this . state . selectedFile === 'string' ? this . state . selectedFile : this . state . selectedFile . name } </ p >
@@ -276,6 +276,14 @@ export default class B4ACodeTree extends React.Component {
276
276
extension = { this . state . extension } />
277
277
</ Resizable >
278
278
</ div > ;
279
+ } else {
280
+ content = (
281
+ < B4AAlert
282
+ show = { true }
283
+ hideClose
284
+ description = "Select a file to Preview"
285
+ />
286
+ ) ;
279
287
}
280
288
281
289
return (
You can’t perform that action at this time.
0 commit comments