1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 09:46:22 +00:00

編集中キャンセルを押しても消える情報があれば警告をだす

This commit is contained in:
Rokt33r
2015-11-25 07:42:02 +09:00
parent f60d957102
commit 137eb44516

View File

@@ -14,7 +14,6 @@ import {
clearSearch,
lockStatus,
unlockStatus,
clearNewArticle,
updateArticle,
destroyArticle,
NEW
@@ -248,9 +247,7 @@ export default class ArticleDetail extends React.Component {
handleCancelButtonClick (e) {
let { activeArticle, dispatch } = this.props
dispatch(unlockStatus())
if (activeArticle.status === NEW) {
dispatch(clearNewArticle())
dispatch(switchArticle(null))
}
dispatch(switchMode(IDLE_MODE))