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

Package errors out when adding @codepen tag to inline block documentation. #1

Open
1 task done
indifferentghost opened this issue Aug 23, 2018 · 2 comments
Open
1 task done

Comments

@indifferentghost
Copy link

How often can you reproduce it?

  • Always

Description:
Package errors out when adding @codepen tag to inline block documentation.

ERROR:
   tag - codepen
   line- @codepen
/Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/q/q.js:155
                throw e;
                ^

TypeError: Cannot read property 'codepen' of undefined
    at Object.add (/Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/bit-docs-html-codepen-link/tags.js:11:31)
    at module.exports (/Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/bit-docs-process-tags/process-tags.js:95:29)
    at /Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/bit-docs-js/process/code_and_comment.js:41:4
    at module.exports (/Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/bit-docs-js/process/code.js:42:2)
    at module.exports (/Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/bit-docs-js/process/code_and_comment.js:40:3)
    at /Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/bit-docs-js/process/javascript.js:26:13
    at Array.map (<anonymous>)
    at module.exports (/Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/configure/node_modules/bit-docs-js/process/javascript.js:25:29)
    at /Users/bitovi/Documents/bitovi/canjs/node_modules/bit-docs/lib/process/file.js:80:17
    at Array.some (<anonymous>)

Steps to reproduce:

Expected results:
Successfully ink to codepen and generate documentation properly.

Environment:

Software Version
bit-docs-html-codepen-link version 1.2.1
Browser
Operating system Mac 10.13.6
@indifferentghost
Copy link
Author

It seems to be referencing this line in bit-docs-html-codepen-link.

Changing that line to what's below prevents the error, but still provides unexpected results:

if(options.siteConfig && options.siteConfig.codepen) {
    this.codepen = options.siteConfig.codepen;
}

unexpected results
example_2

@indifferentghost
Copy link
Author

After further testing:

if(options.siteConfig && options.siteConfig.codepen) {
    this.codepen = options.siteConfig.codepen;
}

Fixes the issue with proper tabbing.

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