-
Notifications
You must be signed in to change notification settings - Fork 88
Description
Describe the bug
The minified code have a bug and breaks when executed; because the variable t not exists. Currenlty I have fixed the code by removing the unused variable.
To Reproduce
You can use the attached Program.cs the code to minify is there.
Minified output or stack trace
var actions={GOSUB:{action:function(){var t,n;if(vidData.inputGrids.length!=0&&options[BC_const.CUSTOM_PROP.ValidaDati]==BC_const.VALIDA_DATI.Oggetto){t={};let t;$(vidData.inputGrids).each(function(){var n=this,i=$("#"+n+"_grid",$videata);let r=$videata.find("#"+n);i[0].ej2_instances[0].isEdit&&(t=i)});t?(n=function(){let n=new $.Deferred;return options.actionId?(t.Wrapper().addDOMMethod(BC_const.EVENTS.GridRowSaved,function(t){t?n.resolve():n.reject()}),t.Wrapper().callDOMMethod(BC_const.EVENTS.GridOutRiga)):n.resolve(),n.promise()},n().then(function(){options.AMBITO&&options.AMBITO.TIPO===BC_const.RIBBONBAR_BUTTON_AMBITO_TIPO.GrigliaNuovaRiga&&t.Wrapper().callDOMMethod(BC_const.EVENTS.GridNewRowPage);$(container).Sistemi().goSub(options)})):$(container).Sistemi().goSub(options)}else $(container).Sistemi().goSub(options)}}}
Excepted output code
var actions={GOSUB:{action:function(){if(vidData.inputGrids.length!=0&&options[BC_const.CUSTOM_PROP.ValidaDati]==BC_const.VALIDA_DATI.Oggetto){var n={};let t;$(vidData.inputGrids).each(function(){var n=this,i=$("#"+n+"_grid",$videata);let r=$videata.find("#"+n);i[0].ej2_instances[0].isEdit&&(t=i)});t?(n=function(){let n=new $.Deferred;return options.actionId?(t.Wrapper().addDOMMethod(BC_const.EVENTS.GridRowSaved,function(t){t?n.resolve():n.reject()}),t.Wrapper().callDOMMethod(BC_const.EVENTS.GridOutRiga)):n.resolve(),n.promise()},n().then(function(){options.AMBITO&&options.AMBITO.TIPO===BC_const.RIBBONBAR_BUTTON_AMBITO_TIPO.GrigliaNuovaRiga&&t.Wrapper().callDOMMethod(BC_const.EVENTS.GridNewRowPage);$(container).Sistemi().goSub(options)})):$(container).Sistemi().goSub(options)}else $(container).Sistemi().goSub(options)}}}