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

Doc builder template should check for mkdocs_page_input_path before using it #3536

Merged
merged 2 commits into from Apr 18, 2018

Conversation

Projects
None yet
4 participants
@marcelstoer
Contributor

marcelstoer commented Jan 21, 2018

mkdocs_page_input_path isn't available on all pages.

@marcelstoer

This comment has been minimized.

Contributor

marcelstoer commented Jan 25, 2018

Not sure about the 'Enhancement' label, feels more like a bug fix to me. Script execution currently fails because of the missing check:

readthedocs-data.js:21 Uncaught ReferenceError: mkdocs_page_input_path is not defined

@davidfischer

This comment has been minimized.

Contributor

davidfischer commented Apr 6, 2018

To catch a JavaScript not defined error, you'd need to use typeof mkdocs_page_input_path !== 'undefined', correct?

@davidfischer davidfischer self-requested a review Apr 6, 2018

davidfischer added a commit to davidfischer/readthedocs.org that referenced this pull request Apr 6, 2018

@marcelstoer

This comment has been minimized.

Contributor

marcelstoer commented Apr 7, 2018

I don't get it...Why did you create a new PR if you're not even sure that it offers any material improvement over this one? Why not just leave a code review question here?

@davidfischer

This comment has been minimized.

Contributor

davidfischer commented Apr 7, 2018

I tried your code and got a JS error. If you fix it, I'm happy to merge this one instead.

@marcelstoer

This comment has been minimized.

Contributor

marcelstoer commented Apr 7, 2018

Ah, now that's valuable feedback. I don't mind either way. I'll certainly take a look but what's missing in your PR is the code comment why that if statement is even necessary.

@agjohnson agjohnson added this to the Mkdocs milestone Apr 10, 2018

@agjohnson agjohnson removed the Mkdocs label Apr 10, 2018

@davidfischer

This comment has been minimized.

Contributor

davidfischer commented Apr 16, 2018

I added that comment in there.

@davidfischer

This replaces #3921

@davidfischer davidfischer merged commit 7f3573a into rtfd:master Apr 18, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@marcelstoer marcelstoer deleted the marcelstoer:patch-1 branch Apr 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment