@@ -115,7 +115,8 @@ let AppInformationFields = ({
115
115
labelWidth = { DEFAULT_SETTINGS_LABEL_WIDTH }
116
116
label = { < Label text = 'App name' /> }
117
117
input = { < TextInput
118
- value = { appName } />
118
+ value = { appName }
119
+ onChange = { ( newValue ) => setAppName ( newValue ) } />
119
120
} />
120
121
< Field
121
122
labelWidth = { 58 }
@@ -538,20 +539,22 @@ export default class GeneralSettings extends DashboardView {
538
539
promiseList . push ( this . context . currentApp . setInProduction ( changes . inProduction ) ) ;
539
540
}
540
541
541
- let addedCollaborators = setDifference ( changes . collaborators , initialFields . collaborators , compareCollaborators ) ;
542
- addedCollaborators . forEach ( ( { userEmail, featuresPermission, classesPermission } ) => {
543
- promiseList . push ( this . context . currentApp . addCollaborator ( userEmail , featuresPermission , classesPermission ) ) ;
544
- } ) ;
545
-
546
- let removedCollaborators = setDifference ( initialFields . collaborators , changes . collaborators , compareCollaborators ) ;
547
- removedCollaborators . forEach ( ( { id } ) => {
548
- promiseList . push ( this . context . currentApp . removeCollaboratorById ( id ) ) ;
549
- } ) ;
550
-
551
- let editedCollaborators = verifyEditedCollaborators ( changes . collaborators ) ;
552
- editedCollaborators . forEach ( ( { id, featuresPermission, classesPermission } ) => {
553
- promiseList . push ( this . context . currentApp . editCollaboratorById ( id , featuresPermission , classesPermission ) ) ;
554
- } ) ;
542
+ if ( changes . collaborators !== undefined ) {
543
+ let addedCollaborators = setDifference ( changes . collaborators , initialFields . collaborators , compareCollaborators ) ;
544
+ addedCollaborators . forEach ( ( { userEmail, featuresPermission, classesPermission } ) => {
545
+ promiseList . push ( this . context . currentApp . addCollaborator ( userEmail , featuresPermission , classesPermission ) ) ;
546
+ } ) ;
547
+
548
+ let removedCollaborators = setDifference ( initialFields . collaborators , changes . collaborators , compareCollaborators ) ;
549
+ removedCollaborators . forEach ( ( { id } ) => {
550
+ promiseList . push ( this . context . currentApp . removeCollaboratorById ( id ) ) ;
551
+ } ) ;
552
+
553
+ let editedCollaborators = verifyEditedCollaborators ( changes . collaborators ) ;
554
+ editedCollaborators . forEach ( ( { id, featuresPermission, classesPermission } ) => {
555
+ promiseList . push ( this . context . currentApp . editCollaboratorById ( id , featuresPermission , classesPermission ) ) ;
556
+ } ) ;
557
+ }
555
558
556
559
let urlKeys = {
557
560
iTunesURL : 'ios' ,
@@ -571,7 +574,7 @@ export default class GeneralSettings extends DashboardView {
571
574
Parse . Promise . when ( promiseList ) . then ( ( ) => {
572
575
promise . resolve ( ) ;
573
576
this . forceUpdate ( ) ; //Need to forceUpdate to see changes applied to source ParseApp
574
- this . setState ( { removedCollaborators : removedCollaborators } ) ;
577
+ this . setState ( { removedCollaborators : removedCollaborators || [ ] } ) ;
575
578
} ) . fail ( errors => {
576
579
promise . reject ( { error : unique ( pluck ( errors , 'error' ) ) . join ( ' ' ) } ) ;
577
580
} ) ;
0 commit comments