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

Nondescriptive error when self-closing <script /> tag is encountered #4

Open
ascott18 opened this issue Jun 30, 2018 · 0 comments
Open

Comments

@ascott18
Copy link

While it is true that a self-closing <script src="./path/to/file.js" /> tag is not valid HTML, it would be nice if there could be a more descriptive error when one is encountered. Currently, the following error is thrown when a self-closing script tag is encountered:

        var nodeContent = input.substring(node.__location.startTag.endOffset, node.__location.endTag.startOffset);
                                                                                                     ^

TypeError: Cannot read property 'startOffset' of undefined
    at padContent (node_modules\vue-parser\lib\index.js:34:102)
    at Object.parse (node_modules\vue-parser\lib\index.js:19:22)
    at Object.host.getSourceFile (node_modules\fork-ts-checker-webpack-plugin\lib\VueProgram.js:110:40)
    at findSourceFile (node_modules\typescript\lib\typescript.js:79645:29)
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

1 participant