From 1440e9a6fcde31ff900bfff99a0b88b5d01f5cd0 Mon Sep 17 00:00:00 2001 From: VLE2FE Date: Thu, 3 Sep 2020 10:54:20 +0200 Subject: [PATCH] implemented editable help --- src/app/help/help.component.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/app/help/help.component.ts b/src/app/help/help.component.ts index 77db6ec..019b469 100644 --- a/src/app/help/help.component.ts +++ b/src/app/help/help.component.ts @@ -44,9 +44,11 @@ export class HelpComponent implements OnInit { } deleteHelp() { - this.api.delete('/help/' + this.route, (ignore, ignore) => { - this.content = new HelpModel().deserialize({text: null, level: 'none'}); - this.edit = false; + this.api.delete('/help/' + this.route, (ignore, err) => { + if (!err) { + this.content = new HelpModel().deserialize({text: null, level: 'none'}); + this.edit = false; + } }); } }