The minimized js file does not work.
Installed product versions
- Visual Studio: [example 2022 Professional]
- This extension: [example 1.1.21]
Description
The minimized js file does not work because I think the process changes the original name of variables
Steps to recreate
Original js code:
div.ondrop = function (e) { e.preventDefault(); var oGrd = BetterComponentsManager.GetComponent("datGridView_grdView"); if (oGrd != null) { oGrd.GridViewBackGroundLayout(true); if (oGrd.OnClientDrandAndDrop.indexOf("javascript") != -1) eval(oGrd.OnClientDrandAndDrop); else eval(oGrd.OnClientDrandAndDrop + "(oGrd, e);"); } }
Ofater executeing de blunder to minify de js file, this code example does not work , i think because the last eval( code written, loses the reference to the oGrd variable
Current behavior
r.ondrop=function(n){n.preventDefault();var t=BetterComponentsManager.GetComponent("datGridView_grdView");t!=null&&(t.GridViewBackGroundLayout(!0),t.OnClientDrandAndDrop.indexOf("javascript")!=-1?eval(t.OnClientDrandAndDrop):eval(t.OnClientDrandAndDrop+"(oGrd, e);"))}
Expected behavior
r.ondrop=function(e){e.preventDefault();var oGrd=BetterComponentsManager.GetComponent("datGridView_grdView");oGrd!=null&&(oGrd.GridViewBackGroundLayout(!0),oGrd.OnClientDrandAndDrop.indexOf("javascript")!=-1?eval(oGrd.OnClientDrandAndDrop):eval(oGrd.OnClientDrandAndDrop+"(oGrd, e);"))}
What is the error message you are getting? It looks like it correctly minimized all of your references to oGrid with t.