Skip to content

  in Pug is causing TypeError: Cannot read property 'text' of undefined #597

@f0rmiga

Description

@f0rmiga

I am using   to emphasize spaces at the end of a line, for example:

a.blue(v-if="index != 0", @click="prev")  
    i.icon.angle.left.icon

It is causing this error:

ERROR in ./~/vue-loader/lib/template-compiler.js?id=data-v-3b169ecc!./~/vue-loader/lib/template-loader.js?raw&engine=pug!./~/vue-loader/lib/selector.js?type=template&index=0!./src/file_to_compile.vue
Module build failed: TypeError: Cannot read property 'text' of undefined
    at Object.chars (/path/to/app/node_modules/vue-template-compiler/build.js:1385:65)
    at parseHTML (/path/to/app/node_modules/vue-template-compiler/build.js:537:17)
    at parse (/path/to/app/node_modules/vue-template-compiler/build.js:1203:3)
    at compile$2 (/path/to/app/node_modules/vue-template-compiler/build.js:2283:13)
    at compile$1 (/path/to/app/node_modules/vue-template-compiler/build.js:5739:10)
    at Object.compile$$1 [as compile] (/path/to/app/node_modules/vue-template-compiler/build.js:5931:18)
    at Object.module.exports (/path/to/app/node_modules/vue-loader/lib/template-compiler.js:60:27)
 @ ./src/file_to_compile.vue 8:23-195

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions