You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Istanbul instruments the code in a way that executing the function always breaks with error TypeError: Cannot destructure 'undefined' as it is undefined., for example:
// format is as emitted by babel-plugin-istanbulconstfn=({ prop }=cov_3lpv0ilsj().b[0][0]++,{})=>{cov_3lpv0ilsj().f[3]++;returnprop;};
The issue is clearly the default statement, which does not get properly wrapped in parens, for example this would work:
Given this example source code:
Istanbul instruments the code in a way that executing the function always breaks with error
TypeError: Cannot destructure 'undefined' as it is undefined.
, for example:The issue is clearly the default statement, which does not get properly wrapped in parens, for example this would work:
Also, if it helps, default values for properties in the destructure expression work just fine:
Environment
Config
.babelrc
The text was updated successfully, but these errors were encountered: