Skip to content

Commit 34c7966

Browse files
committed
docs: Avoid identifier has already been declared error
1 parent 74260f8 commit 34c7966

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

docs/static/main.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
2-
const quote = "Learn once, run anywhere";
3-
41
window.addEventListener('load', function () {
52
var subtitle = document.getElementsByClassName("_subtitle");
63

74
// In case adding more than once!
85
if (subtitle.length != 0)
96
return;
107

8+
// Place it here to avoid error: `Identifier 'xxx' has already been declared`.
9+
const quote = "Learn once, run anywhere";
10+
1111
const titles = document.getElementsByClassName("gdoc-brand__title");
1212

1313
const title = titles[0]

0 commit comments

Comments
 (0)