1
0
mirror of https://github.com/Pomax/BezierInfo-2.git synced 2025-08-19 06:52:02 +02:00

test deploy with renderToString

This commit is contained in:
Pomax
2017-03-10 13:21:11 -08:00
parent a3380660b2
commit 05b2bca7e0
15 changed files with 591 additions and 181 deletions

View File

@@ -7,7 +7,7 @@ var SectionHeader = React.createClass({
render: function() {
var locale = SectionHeader.locale;
if (typeof window !== undefined && window.location.toString().indexOf(locale) === -1) {
if (typeof window !== "undefined" && window.location.toString().indexOf(locale) === -1) {
locale = '';
}
var fragmentid = `${locale ? './' + locale + '/': '.'}#${this.props.name}`;
@@ -18,9 +18,11 @@ var SectionHeader = React.createClass({
);
},
componentDidMount() {
var h = window.location.hash;
if (h) {
window.location = window.location.hash;
if (typeof window !== "undefined" && window.location) {
var h = window.location.hash;
if (h) {
window.location = window.location.hash;
}
}
}
});