Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Rule "for-of/for-each"] TypeError: Property alternate of ConditionalExpression expected node to be of a type ["Expression"] but instead got undefined #122

Closed
inilim opened this issue May 5, 2024 · 1 comment

Comments

@inilim
Copy link

inilim commented May 5, 2024

TypeError: Property alternate of ConditionalExpression expected node to be of a type ["Expression"] but instead got undefined at Object.n [as validate] (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:242212) at validateField (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:315196) at validate$2 (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:315063) at e._replaceWith (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:930999) at e._remove (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:966873) at e.remove$w [as remove] (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:966287) at remove$v.remove (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:1023106) at fix$9 (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:1375147) at file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:1375399 at tryCatch$6 (file:///E:/other/nvm/v20.11.1/node_modules/minify/node_modules/@putout/minify/bundle/minify.min.js:1:1329304) { loc: { line: 910, column: 11 }, rule: 'for-of/for-each' }

изображение

var Le = function t(e) { var n = []; return e instanceof Map ? e.forEach(function (e, o) { var i = e; "object" === r(i) && (i = t(i)), n.push([o, i]); }) : Object.keys(e).forEach(function (o) { // 910 line var i = e[o]; "object" === r(i) && (i = t(i)), n.push([o, i]); }), n; }

изображение

@coderaiser
Copy link
Owner

Just fixed with @putout/minfy v3.9.0 🎉. Please re-install Minify, is it works for you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants