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
I'm not sure that unassert's responsible for this issue, but I record.
This is a minimum sample to occur the error.
functionadd(a,b){!console.assert(a)returna+b;}
Error:
/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:2421
type = expr.type || Syntax.Property;
^
TypeError: Cannot read property 'type' of null
at CodeGenerator.generateExpression (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:2421:20)
at CodeGenerator.Statement.ExpressionStatement (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:1321:28)
at CodeGenerator.generateStatement (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:2440:33)
at /Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:1078:51
at withIndent (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:582:9)
at CodeGenerator.Statement.BlockStatement (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:1028:13)
at CodeGenerator.generateStatement (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:2440:33)
at CodeGenerator.maybeBlock (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:837:33)
at CodeGenerator.generateFunctionBody (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:955:30)
at CodeGenerator.Statement.FunctionDeclaration (/Users/tgfjt/workspace/unassert-sample/node_modules/escodegen/escodegen.js:1733:22)
Activity
twada commentedon Dec 8, 2015
@tgfjt Thank you for using unassert, thank you for reporting, and thank you for creating minimal reproduction case.
Yes, this is a bug. I'll fix it ASAP.