diff --git a/js/app/models/PlotObjects/PlotHistogram1DSerieObject.js b/js/app/models/PlotObjects/PlotHistogram1DSerieObject.js index c6e2100..f23b2dd 100644 --- a/js/app/models/PlotObjects/PlotHistogram1DSerieObject.js +++ b/js/app/models/PlotObjects/PlotHistogram1DSerieObject.js @@ -29,14 +29,16 @@ Ext.define('amdaPlotObj.PlotHistogram1DSerieObject', { constructor: function(){ var me = this; - if (!arguments['histo1d-yaxis']) { - // Compatibility mode to support old saved requests - arguments['histo1d-yaxis'] = amdaDefaultValues.plot.histogram1D.histo1DyAxis; - } - if (!arguments['histo1d-style']) { - // Compatibility mode to support old saved requests - arguments['histo1d-style'] = amdaDefaultValues.plot.histogram1D.histo1DStyle; - } + if ((arguments.length > 0) && arguments[0]) { + if (!arguments[0]['histo1d-yaxis']) { + // Compatibility mode to support old saved requests + arguments[0]['histo1d-yaxis'] = amdaDefaultValues.plot.histogram1D.histo1DyAxis; + } + if (!arguments['histo1d-style']) { + // Compatibility mode to support old saved requests + arguments[0]['histo1d-style'] = amdaDefaultValues.plot.histogram1D.histo1DStyle; + } + } me.callParent(arguments); }, diff --git a/js/app/models/PlotObjects/PlotHistogram2DSerieObject.js b/js/app/models/PlotObjects/PlotHistogram2DSerieObject.js index 2a5128d..578d416 100644 --- a/js/app/models/PlotObjects/PlotHistogram2DSerieObject.js +++ b/js/app/models/PlotObjects/PlotHistogram2DSerieObject.js @@ -30,11 +30,13 @@ Ext.define('amdaPlotObj.PlotHistogram2DSerieObject', { constructor: function(){ var me = this; - me.callParent(arguments); - if (!arguments['histo2d-yaxis']) { - // Compatibility mode to support old saved requests - arguments['histo2d-yaxis'] = amdaDefaultValues.plot.histogram2D.histo2DyAxis; - } + if ((arguments.length > 0) && arguments[0]) { + if (!arguments[0]['histo2d-yaxis']) { + // Compatibility mode to support old saved requests + arguments[0]['histo2d-yaxis'] = amdaDefaultValues.plot.histogram2D.histo2DyAxis; + } + } + me.callParent(arguments); }, setDefaultValues: function() -- libgit2 0.21.2