Commit 1b28b610476fe1e34bd5c6ecbf98fe5f5add000b

Authored by Benjamin Renard
1 parent ac097a6f

Prevent bad date values in state file

Showing 1 changed file with 4 additions and 0 deletions   Show diff stats
js/app/controllers/DownloadModule.js
... ... @@ -39,6 +39,10 @@ Ext.define('amdaDesktop.DownloadModule', {
39 39 var form = uiContent.down('form').getForm();
40 40 var values = form.getValues();
41 41 // Ext.state.Manager.set(this.id + '_form', values);
  42 + if (Number.isNaN(Date.parse(values.startDate)) || Number.isNaN(Date.parse(values.stopDate))) {
  43 + return;
  44 + }
  45 +
42 46 Ext.state.Manager.set('timeinterval', {'startDate' : values.startDate,'stopDate' : values.stopDate });
43 47 },
44 48  
... ...