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

Error on arrow functions #78

Closed
sbowler opened this issue Jun 27, 2018 · 3 comments
Closed

Error on arrow functions #78

sbowler opened this issue Jun 27, 2018 · 3 comments

Comments

@sbowler
Copy link

sbowler commented Jun 27, 2018

It looks like the latest fixes are failing on arrow functions.

\node_modules\jsdoc-vuejs\index.js:50
        if (e.doclet.memberof.endsWith('.methods')) {
                              ^

TypeError: Cannot read property 'endsWith' of undefined

This happens in an index.vue file with

export default {
  name: 'AuthModule',
  computed: {
    ...mapState({
      fooList: state => state.$_foo.fooList,
      barList: state => state.$_foo.barList
    })
  },
  created() {
...

I'm still trying to figure out how to work around this issue, but I thought I should let you know.

@sbowler
Copy link
Author

sbowler commented Jun 27, 2018

I was able to work around this by adding a memberOf tag before each function, but ideally these should just be ignored.

export default {
  name: 'AuthModule',
  computed: {
    ...mapState({
      /**
       * @memberOf Auth
       */
      fooList: state => state.$_foo.fooList,
      /**
       * @memberOf Auth
       */
      barList: state => state.$_foo.barList
    })
  },
  created() {
...

@Kocal
Copy link
Owner

Kocal commented Jun 28, 2018

Yes it should be ignored.
Thanks for finding this issue, I will write a patch ASAP

@Kocal
Copy link
Owner

Kocal commented Jun 28, 2018

It has been fixed in #79 and published in v2.0.4.

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