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 {
139139 files : [ {
140140 name : 'README.md' ,
141141 content : SCRATCH_PAPER ,
142- contributors : [ ] ,
142+ contributors : undefined ,
143143 } , {
144144 name : `code.${ ext } ` ,
145145 content : '' ,
146- contributors : [ ] ,
146+ contributors : undefined ,
147147 } ] ,
148148 } ) ;
149149 } else if ( gistId ) {
@@ -189,7 +189,7 @@ class App extends React.Component {
189189 this . props . addFile ( {
190190 name,
191191 content : '' ,
192- contributors : [ ] ,
192+ contributors : undefined ,
193193 } ) ;
194194 }
195195
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ import 'brace/mode/python';
99import 'brace/theme/tomorrow_night_eighties' ;
1010import 'brace/ext/searchbox' ;
1111import faTrashAlt from '@fortawesome/fontawesome-free-solid/faTrashAlt' ;
12+ import faUser from '@fortawesome/fontawesome-free-solid/faUser' ;
1213import { tracerManager } from '/core' ;
1314import { classes , extension } from '/common/util' ;
1415import { actions } from '/reducers' ;
@@ -88,7 +89,7 @@ class CodeEditor extends React.Component {
8889 < div className = { classes ( styles . contributors_viewer , className ) } >
8990 < span className = { classes ( styles . contributor , styles . label ) } > Contributed by</ span >
9091 {
91- ( file . contributors . length ? file . contributors : user ? [ user ] : [ ] ) . map ( contributor => (
92+ ( file . contributors || [ user || { login : 'guest' , avatar_url : faUser } ] ) . map ( contributor => (
9293 < Button className = { styles . contributor } icon = { contributor . avatar_url } key = { contributor . login }
9394 href = { `https://github.com/${ contributor . login } ` } >
9495 { contributor . login }
You can’t perform that action at this time.
0 commit comments