From 4870282bc7ade2f90f3290102629a5eb47b5aa4d Mon Sep 17 00:00:00 2001 From: adriangroch Date: Tue, 10 Dec 2019 11:38:47 +1100 Subject: [PATCH] Request PR change --- src/rich_text_editor/model/RichTextEditor.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/rich_text_editor/model/RichTextEditor.js b/src/rich_text_editor/model/RichTextEditor.js index e6a63d96c..3fb22e043 100644 --- a/src/rich_text_editor/model/RichTextEditor.js +++ b/src/rich_text_editor/model/RichTextEditor.js @@ -195,7 +195,10 @@ export default class RichTextEditor { */ syncActions() { this.getActions().forEach(action => { - if (!action.state || (action.state && action.state() >= 0)) { + if ( + !action.state || + (action.state && action.state(this, this.doc) >= 0) + ) { const event = action.event || 'click'; action.btn[`on${event}`] = e => { action.result(this, action);