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<
207
207
type = "button"
208
208
title = { this . props . trans . __ ( 'Create a new branch' ) }
209
209
value = { this . props . trans . __ ( 'Create Branch' ) }
210
- onClick = { this . _onCreate }
210
+ onClick = { ( ) => {
211
+ this . _createBranch ( ) ;
212
+ } }
211
213
disabled = { this . state . name === '' || this . state . error !== '' }
212
214
/>
213
215
</ DialogActions >
@@ -407,26 +409,17 @@ export class NewBranchDialog extends React.Component<
407
409
} ) ;
408
410
} ;
409
411
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
-
420
412
/**
421
413
* Creates a new branch.
422
414
*
423
415
* @param branch - branch name
424
416
* @returns promise which resolves upon attempting to create a new branch
425
417
*/
426
- private async _createBranch ( branch : string ) : Promise < void > {
418
+ private async _createBranch ( ) : Promise < void > {
427
419
const opts = {
428
420
newBranch : true ,
429
- branchname : branch
421
+ branchname : this . state . name ,
422
+ startpoint : this . state . base
430
423
} ;
431
424
432
425
this . props . logger . log ( {
You can’t perform that action at this time.
0 commit comments