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

Crash when a comment is included #23

Open
psiphi75 opened this issue May 10, 2018 · 0 comments
Open

Crash when a comment is included #23

psiphi75 opened this issue May 10, 2018 · 0 comments

Comments

@psiphi75
Copy link

The following code causes a crash:

function a() {
  return '';   // a
}

export { 
  a
};

Where as if you remove the // a comment it does not.

The crash error is:

/home/user/node_modules/flow-jsdoc/index.js:210
            if (declaration.type === 'VariableDeclaration') {
                            ^

TypeError: Cannot read property 'type' of null
    at getCommentedFunctionNode (/home/user/node_modules/flow-jsdoc/index.js:210:29)
    at decorateFunctions (/home/user/node_modules/flow-jsdoc/index.js:291:20)
    at /home/user/node_modules/flow-jsdoc/index.js:408:9
    at walk (/home/user/node_modules/flow-jsdoc/lib/falafel.js:62:9)
    at /home/user/node_modules/flow-jsdoc/lib/falafel.js:53:25
    at Array.forEach (<anonymous>)
    at forEach (/home/user/node_modules/flow-jsdoc/lib/falafel.js:10:31)
    at /home/user/node_modules/flow-jsdoc/lib/falafel.js:51:17
    at Array.forEach (<anonymous>)
    at forEach (/home/user/node_modules/flow-jsdoc/lib/falafel.js:10:31)
@kegsay kegsay self-assigned this May 12, 2018
@kegsay kegsay removed their assignment Nov 7, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants