website: fix JavaScript error on website and blog in non-ES6 browsers
In Safari a JavaScript error in personalizeInstallInstructions prevents the featured articles from displaying. startsWith is an ES6-only feature. Fixes golang/go#12283 Change-Id: I9f471362cdac0243758e482ed3a21b0d6aa48c8b Reviewed-on: https://go-review.googlesource.com/13841 Reviewed-by: Andrew Gerrand <adg@golang.org>
This commit is contained in:
parent
93604a3dc2
commit
6c9aff3429
|
@ -248,7 +248,7 @@ function toggleHash() {
|
|||
function personalizeInstallInstructions() {
|
||||
var prefix = '?download=';
|
||||
var s = window.location.search;
|
||||
if (!s.startsWith(prefix)) {
|
||||
if (s.indexOf(prefix) != 0) {
|
||||
// No 'download' query string; bail.
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -813,7 +813,7 @@ function toggleHash() {
|
|||
function personalizeInstallInstructions() {
|
||||
var prefix = '?download=';
|
||||
var s = window.location.search;
|
||||
if (!s.startsWith(prefix)) {
|
||||
if (s.indexOf(prefix) != 0) {
|
||||
// No 'download' query string; bail.
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue