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

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

Merged
merged 2 commits into from Apr 18, 2018
Merged

Conversation

@marcelstoer
Copy link
Contributor

@marcelstoer marcelstoer commented Jan 21, 2018

mkdocs_page_input_path isn't available on all pages.

@marcelstoer
Copy link
Contributor Author

@marcelstoer 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
Copy link
Contributor

@davidfischer 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 issue Apr 6, 2018
@marcelstoer
Copy link
Contributor Author

@marcelstoer 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
Copy link
Contributor

@davidfischer 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
Copy link
Contributor Author

@marcelstoer 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
Copy link
Contributor

@davidfischer davidfischer commented Apr 16, 2018

I added that comment in there.

Copy link
Contributor

@davidfischer davidfischer left a comment

This replaces #3921

@davidfischer davidfischer merged commit 7f3573a into readthedocs:master Apr 18, 2018
1 check passed
@marcelstoer marcelstoer deleted the patch-1 branch Apr 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants