File tree Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Expand file tree Collapse file tree 1 file changed +13
-12
lines changed Original file line number Diff line number Diff line change @@ -450,20 +450,21 @@ export class CodeSnippetEditor extends ReactWidget {
450450 console . log ( newSnippet ) ;
451451
452452 if ( oldName . toLowerCase ( ) === newSnippet . name . toLowerCase ( ) ) {
453-
454453 const oldSnippet = this . contentsService . getSnippet ( oldName ) [ 0 ] ;
455- saveOverWriteFile ( this . contentsService , oldSnippet , newSnippet ) . then ( ( res : boolean ) => {
456- if ( res ) {
457- this . contentsService
458- . modifyExistingSnippet ( oldName , newSnippet )
459- . then ( ( res : boolean ) => {
460- if ( ! res ) {
461- console . log ( 'Error in modifying snippet' ) ;
462- return false ;
463- }
464- } ) ;
454+ saveOverWriteFile ( this . contentsService , oldSnippet , newSnippet ) . then (
455+ ( res : boolean ) => {
456+ if ( res ) {
457+ this . contentsService
458+ . modifyExistingSnippet ( oldName , newSnippet )
459+ . then ( ( res : boolean ) => {
460+ if ( ! res ) {
461+ console . log ( 'Error in modifying snippet' ) ;
462+ return false ;
463+ }
464+ } ) ;
465+ }
465466 }
466- } )
467+ ) ;
467468 }
468469 }
469470
You can’t perform that action at this time.
0 commit comments