Only run tabbing logic on docs that contain blocks

Summary:
Builds upon #14212
Closes https://github.com/facebook/react-native/pull/14213

Differential Revision: D5149113

Pulled By: hramos

fbshipit-source-id: 99684bbb3bcae0e6061641373c6af7446729d7bd
This commit is contained in:
Hector Ramos 2017-05-30 13:17:03 -07:00 committed by Facebook Github Bot
parent b302bec531
commit ffa76d02dc
1 changed files with 4 additions and 0 deletions

View File

@ -202,6 +202,10 @@
} }
function guessPlatformAndOS() { function guessPlatformAndOS() {
if (!document.querySelector('block')) {
return;
}
// If we are coming to the page with a hash in it (i.e. from a search, for example), try to get // If we are coming to the page with a hash in it (i.e. from a search, for example), try to get
// us as close as possible to the correct platform and dev os using the hashtag and block walk up. // us as close as possible to the correct platform and dev os using the hashtag and block walk up.
var foundHash = false; var foundHash = false;