File tree Expand file tree Collapse file tree
packages/new-polymath-issuer/src/pages/DividendsWizard Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -236,7 +236,16 @@ export class ContainerBase extends Component<Props, State> {
236236 render = { ( dividendsData : {
237237 [ key : string ] : types . DividendEntity [ ] ;
238238 } ) => {
239- const dividends = flatten ( values ( dividendsData ) ) ;
239+ const { dispatch } = this . props ;
240+ const dividendsListUrl = `/securityTokens/${ securityTokenSymbol } /dividends` ;
241+
242+ const checkpointsList = values ( dividendsData ) ;
243+ if ( checkpointsList . length === 0 ) {
244+ // No checkpoints exist
245+ dispatch ( push ( dividendsListUrl ) ) ;
246+ }
247+
248+ const dividends = flatten ( checkpointsList ) ;
240249 const isCompleted = map ( dividends , dividend => {
241250 const { expiry, investors } = dividend ;
242251 const remainingPayments = investors . filter (
@@ -253,8 +262,6 @@ export class ContainerBase extends Component<Props, State> {
253262
254263 if ( ! allDividendsCompleted ) {
255264 // There are dividends with pending distribution
256- const { dispatch } = this . props ;
257- const dividendsListUrl = `/securityTokens/${ securityTokenSymbol } /dividends` ;
258265 dispatch ( push ( dividendsListUrl ) ) ;
259266 }
260267 return (
You can’t perform that action at this time.
0 commit comments