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

[docs] Fix i18n page transition #13947

Merged
merged 2 commits into from
Dec 20, 2018
Merged

[docs] Fix i18n page transition #13947

merged 2 commits into from
Dec 20, 2018

Conversation

li-yechao
Copy link

No description provided.

@oliviertassinari
Copy link
Member

@unordered How we can reproduce the issue?

@li-yechao
Copy link
Author

@oliviertassinari
checkout from master
yarn install
yarn start
open left menu and click anyone

TypeError: Cannot read property 'offsetTop' of null
AppTableOfContents._this.findActiveIndex
./docs/src/modules/components/AppTableOfContents.js:130

  127 | 
  128 | for (let i = 0; i < this.itemsClient.length; i += 1) {
  129 |   const item = this.itemsClient[i];
> 130 |   if (
  131 |     document.documentElement.scrollTop < item.node.offsetTop + 100 ||
  132 |     i === this.itemsClient.length - 1
  133 |   ) {

Try more times if no error.

@oliviertassinari
Copy link
Member

What browser do you use?

@li-yechao
Copy link
Author

chrome with latest version

@joshwooding
Copy link
Member

I’ve never had this issue

@oliviertassinari oliviertassinari self-assigned this Dec 19, 2018
@oliviertassinari oliviertassinari changed the title fix: node maybe null [docs] Fix i18n page transition Dec 20, 2018
@oliviertassinari oliviertassinari added bug 🐛 Something doesn't work docs Improvements or additions to the documentation labels Dec 20, 2018
@oliviertassinari
Copy link
Member

@joshwooding Change the language then change the page, you will see the error. I'm having a look at it.

@oliviertassinari oliviertassinari removed their assignment Dec 20, 2018
@oliviertassinari oliviertassinari merged commit 41c2703 into mui:master Dec 20, 2018
@oliviertassinari
Copy link
Member

@unordered It's a great first pull request on Material-UI 👌🏻. Thank you for working on it!

@li-yechao
Copy link
Author

@oliviertassinari it's my honor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something doesn't work docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants