From 12c49aa04430345b6d9f03f553f3b003e430466b Mon Sep 17 00:00:00 2001 From: Robbert Feunekes <6520064+Muukuro@users.noreply.github.com> Date: Fri, 3 Jul 2020 14:28:34 +0200 Subject: [PATCH] Fixed: Cannot set property 'isReadOnly' of null When the prop `disabled` is mutated AFTER the component has mounted, but BEFORE `this.editor.create` is resolved, this results in an error "TypeError: Cannot set property 'isReadOnly' of null". Checking if the instance is successfully initialized prevents this error. --- src/ckeditor.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/ckeditor.js b/src/ckeditor.js index 9a25f00..0250037 100644 --- a/src/ckeditor.js +++ b/src/ckeditor.js @@ -121,7 +121,9 @@ export default { // Synchronize changes of #disabled. disabled( val ) { - this.instance.isReadOnly = val; + if (this.instance) { + this.instance.isReadOnly = val; + } } },