Skip to content

OpenProject is the leading open source project management software for product, project and portfolio management. A powerful Jira alternative with agile planning, issue tracking, roadmaps, Gantt charts, time tracking, collaboration features, and more. Available on premises or in the cloud. ⭐ Star us on GitHub

Fall back to empty string to not confuse ckeditor

Oliver Güntherf88b5eb994f7
diff --git a/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.component.ts b/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.component.ts
index 815f02fcf99..5eb8eb18f4f 100644
--- a/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.component.ts
+++ b/frontend/src/app/shared/components/editor/components/ckeditor/op-ckeditor.component.ts
@@ -52,10 +52,10 @@ export class OpCkeditorComponent implements OnInit, OnDestroy {
@Input()
public set content(newVal:string) {
- this._content = newVal;
+ this._content = newVal || '';
if (this.initialized) {
- this.ckEditorInstance.setData(newVal);
+ this.ckEditorInstance.setData(this._content);
}
}
@@ -84,7 +84,7 @@ export class OpCkeditorComponent implements OnInit, OnDestroy {
public manualMode = false;
- private _content:string;
+ private _content:string = '';
public text = {
errorTitle: this.I18n.t('js.editor.ckeditor_error'),