File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -139,11 +139,11 @@ class App extends React.Component {
139
139
files : [ {
140
140
name : 'README.md' ,
141
141
content : SCRATCH_PAPER ,
142
- contributors : [ ] ,
142
+ contributors : undefined ,
143
143
} , {
144
144
name : `code.${ ext } ` ,
145
145
content : '' ,
146
- contributors : [ ] ,
146
+ contributors : undefined ,
147
147
} ] ,
148
148
} ) ;
149
149
} else if ( gistId ) {
@@ -189,7 +189,7 @@ class App extends React.Component {
189
189
this . props . addFile ( {
190
190
name,
191
191
content : '' ,
192
- contributors : [ ] ,
192
+ contributors : undefined ,
193
193
} ) ;
194
194
}
195
195
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import 'brace/mode/python';
9
9
import 'brace/theme/tomorrow_night_eighties' ;
10
10
import 'brace/ext/searchbox' ;
11
11
import faTrashAlt from '@fortawesome/fontawesome-free-solid/faTrashAlt' ;
12
+ import faUser from '@fortawesome/fontawesome-free-solid/faUser' ;
12
13
import { tracerManager } from '/core' ;
13
14
import { classes , extension } from '/common/util' ;
14
15
import { actions } from '/reducers' ;
@@ -88,7 +89,7 @@ class CodeEditor extends React.Component {
88
89
< div className = { classes ( styles . contributors_viewer , className ) } >
89
90
< span className = { classes ( styles . contributor , styles . label ) } > Contributed by</ span >
90
91
{
91
- ( file . contributors . length ? file . contributors : user ? [ user ] : [ ] ) . map ( contributor => (
92
+ ( file . contributors || [ user || { login : 'guest' , avatar_url : faUser } ] ) . map ( contributor => (
92
93
< Button className = { styles . contributor } icon = { contributor . avatar_url } key = { contributor . login }
93
94
href = { `https://github.com/${ contributor . login } ` } >
94
95
{ contributor . login }
You can’t perform that action at this time.
0 commit comments