Skip to content
This repository was archived by the owner on Sep 11, 2020. It is now read-only.

Commit cefb87f

Browse files
author
Tsyren Balzhanov
committed
Checking whether placeholder plugin is enabled before trying to change its updatePlaceholder function
1 parent ba4b5a6 commit cefb87f

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/js/core.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,9 @@
6666
this.options.editor.destroy = this.editorDestroy;
6767
this.options.editor.setup = this.editorSetup;
6868

69-
this.options.editor.getExtensionByName('placeholder').updatePlaceholder = this.editorUpdatePlaceholder;
69+
if (this.options.editor.getExtensionByName('placeholder') !== undefined) {
70+
this.options.editor.getExtensionByName('placeholder').updatePlaceholder = this.editorUpdatePlaceholder;
71+
}
7072
}
7173
}
7274

0 commit comments

Comments
 (0)