OSDN Git Service

fixed the error generate raw transactions.
authorZhiting Lin <zlin035@uottawa.ca>
Fri, 20 Jul 2018 03:38:40 +0000 (11:38 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Fri, 20 Jul 2018 03:38:40 +0000 (11:38 +0800)
src/features/transactions/components/New/New.jsx

index 0acfef8..3788d74 100644 (file)
@@ -33,7 +33,7 @@ class Form extends React.Component {
       })
     }
     this.props.router.setRouteLeaveHook(this.props.route, (nextLocation) => {
-      if (!(this.handleFormEmpty() || nextLocation.state))
+      if (!(this.handleFormEmpty() || nextLocation.state || nextLocation.pathname.startsWith('/transactions/generated/')))
         return this.props.lang === 'zh'? '交易表格有未完成内容,你确定要离开么?' : 'Your work is not saved! Are you sure you want to leave?'
     })
   }