From 456e7261e8f3f2fdcafcc1ffeb27f7d96c39186f Mon Sep 17 00:00:00 2001 From: mx1700 Date: Thu, 22 Aug 2019 21:51:10 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=E4=B8=80=E4=B8=AA=E5=B4=A9?= =?UTF-8?q?=E6=BA=83=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/page/WritePage.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/page/WritePage.js b/src/page/WritePage.js index 9ed9db5..3c6f2af 100644 --- a/src/page/WritePage.js +++ b/src/page/WritePage.js @@ -115,7 +115,7 @@ export default class WritePage extends Component { this.loadNotebook().then(notebookCount => { if(notebookCount > 0) { InteractionManager.runAfterInteractions(() => { - this.contentInput.focus(); + this && this.contentInput && this.contentInput.focus(); }); } else { Alert.alert('提示', '没有可用日记本,无法写日记',[ @@ -171,7 +171,7 @@ export default class WritePage extends Component { this.setState({modalVisible: false}, () => { setTimeout(() => { if(showKeyboard) { - this.contentInput.focus() + this && this.contentInput && this.contentInput.focus() } else { if(typeof callback == 'function') { callback();