Skip to content

Commit c4380ea

Browse files
committed
fix null check
1 parent 019b0a3 commit c4380ea

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/RichTextEditor.js

+3-1
Original file line numberDiff line numberDiff line change
@@ -325,7 +325,9 @@ export default class RichTextEditor extends Component {
325325
_sendAction(action, data) {
326326
let jsonString = JSON.stringify({type: action, data});
327327
jsonString = this.escapeJSONString(jsonString);
328-
this.webviewBridge.sendToBridge(jsonString);
328+
if (this.webviewBridge && this.webviewBridge.sendToBridge) {
329+
this.webviewBridge.sendToBridge(jsonString);
330+
}
329331
}
330332

331333
//-------------------------------------------------------------------------------

0 commit comments

Comments
 (0)