mirror of
https://github.com/timepill/timepill-app.git
synced 2025-04-30 09:59:31 +08:00
修复一个崩溃问题
This commit is contained in:
parent
6be0a4c3c3
commit
456e7261e8
1 changed files with 2 additions and 2 deletions
|
@ -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();
|
||||
|
|
Loading…
Reference in a new issue