File tree Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Expand file tree Collapse file tree 2 files changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -96,7 +96,8 @@ export class UserDetailsBody extends ReactWidget {
9696 } ;
9797
9898 render ( ) {
99- if ( ! this . _userManager . identity ) {
99+ const identity = this . _userManager . identity ;
100+ if ( ! identity ) {
100101 return < div className = "jp-UserInfo-Details" > Error loading user info</ div > ;
101102 }
102103 const updatableFields = ( this . _userManager . permissions ?. [
@@ -105,7 +106,7 @@ export class UserDetailsBody extends ReactWidget {
105106
106107 return (
107108 < div className = "jp-UserInfo-Details" >
108- { Object . keys ( this . _userManager . identity ) . map ( ( field : string ) => {
109+ { Object . keys ( identity ) . map ( ( field : string ) => {
109110 const id = `jp-UserInfo-Value-${ field } ` ;
110111 return (
111112 < div key = { field } className = "jp-UserInfo-Field" >
@@ -117,7 +118,7 @@ export class UserDetailsBody extends ReactWidget {
117118 onInput = { ( event : React . ChangeEvent < HTMLInputElement > ) =>
118119 this . _onChange ( event , field )
119120 }
120- defaultValue = { this . _userManager . identity ! [ field ] as string }
121+ defaultValue = { identity [ field ] as string }
121122 disabled = { ! updatableFields ?. includes ( field ) }
122123 />
123124 </ div >
Original file line number Diff line number Diff line change 151151 justify-content : space-between;
152152}
153153
154- .jp-UserInfo-Field > * {
154+ .jp-UserInfo-Field > label ,
155+ .jp-UserInfo-Field > input {
155156 padding : 0.5em 1em ;
156157 margin : 0.25em 0 ;
157158}
You can’t perform that action at this time.
0 commit comments