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

Fix error when including tutorials #51

Merged
merged 1 commit into from Jan 7, 2019
Merged

Fix error when including tutorials #51

merged 1 commit into from Jan 7, 2019

Conversation

cahilfoley
Copy link
Contributor

Adding check for existence of ancestors property on item before reading ancestors.length. The ancestors property does not exist on tutorial items so the build breaks with the following error:

C:\dev\projects\stuff\node_modules\docdash\publish.js:335
      if (item.ancestors.length > level) {
                         ^

TypeError: Cannot read property 'length' of undefined

Adding check for existence of `ancestors` property before reading `length`. The `ancestors` property does not exist on tutorial items so the build breaks with the following error:

```
C:\dev\projects\stuff\node_modules\docdash\publish.js:335
      if (item.ancestors.length > level) {
                         ^

TypeError: Cannot read property 'length' of undefined
```
@ar2rsawseen ar2rsawseen merged commit d3aa9c9 into clenemt:master Jan 7, 2019
@cahilfoley cahilfoley deleted the patch-1 branch January 7, 2019 08:43
@toddq toddq mentioned this pull request Feb 19, 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

Successfully merging this pull request may close these issues.

None yet

2 participants