Skip to content

Commit 47d4ff6

Browse files
committed
Fix linting error
1 parent de1a316 commit 47d4ff6

File tree

1 file changed

+13
-12
lines changed

1 file changed

+13
-12
lines changed

src/CodeSnippetEditor.tsx

Lines changed: 13 additions & 12 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)