File tree Expand file tree Collapse file tree 1 file changed +6
-13
lines changed
Expand file tree Collapse file tree 1 file changed +6
-13
lines changed Original file line number Diff line number Diff line change @@ -207,7 +207,9 @@ export class NewBranchDialog extends React.Component<
207207 type = "button"
208208 title = { this . props . trans . __ ( 'Create a new branch' ) }
209209 value = { this . props . trans . __ ( 'Create Branch' ) }
210- onClick = { this . _onCreate }
210+ onClick = { ( ) => {
211+ this . _createBranch ( ) ;
212+ } }
211213 disabled = { this . state . name === '' || this . state . error !== '' }
212214 />
213215 </ DialogActions >
@@ -407,26 +409,17 @@ export class NewBranchDialog extends React.Component<
407409 } ) ;
408410 } ;
409411
410- /**
411- * Callback invoked upon clicking a button to create a new branch.
412- *
413- * @param event - event object
414- */
415- private _onCreate = ( ) : void => {
416- // Create the branch:
417- this . _createBranch ( this . state . name ) ;
418- } ;
419-
420412 /**
421413 * Creates a new branch.
422414 *
423415 * @param branch - branch name
424416 * @returns promise which resolves upon attempting to create a new branch
425417 */
426- private async _createBranch ( branch : string ) : Promise < void > {
418+ private async _createBranch ( ) : Promise < void > {
427419 const opts = {
428420 newBranch : true ,
429- branchname : branch
421+ branchname : this . state . name ,
422+ startpoint : this . state . base
430423 } ;
431424
432425 this . props . logger . log ( {
You can’t perform that action at this time.
0 commit comments