File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed
src/extensions/default/Git/src Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -128,6 +128,11 @@ define(function (require, exports) {
128128 }
129129 }
130130 } ) ;
131+ } ) . catch ( err => {
132+ console . error ( "Error Getting branches" , err ) ;
133+ // we need to strip all user entered info from git thrown exception for get branches which shouldn't fail,
134+ // so we throw a blank error for bugsnag
135+ throw new Error ( "Failed to get getBranches while doMerge" ) ;
131136 } ) ;
132137 }
133138
@@ -168,7 +173,7 @@ define(function (require, exports) {
168173
169174 Git . getAllBranches ( ) . catch ( function ( err ) {
170175 ErrorHandler . showError ( err ) ;
171- } ) . then ( function ( branches ) {
176+ } ) . then ( function ( branches = [ ] ) {
172177
173178 var compiledTemplate = Mustache . render ( newBranchTemplate , {
174179 branches : branches ,
@@ -335,7 +340,7 @@ define(function (require, exports) {
335340
336341 Git . getBranches ( ) . catch ( function ( err ) {
337342 ErrorHandler . showError ( err , Strings . ERROR_GETTING_BRANCH_LIST ) ;
338- } ) . then ( function ( branches ) {
343+ } ) . then ( function ( branches = [ ] ) {
339344 branches = branches . reduce ( function ( arr , branch ) {
340345 if ( ! branch . currentBranch && ! branch . remote ) {
341346 arr . push ( branch . name ) ;
You can’t perform that action at this time.
0 commit comments