Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
Nodemcu Firmware
Commits
2f8b3536
Commit
2f8b3536
authored
Apr 16, 2017
by
Marcel Stör
Browse files
Prevent determineSelectedLanguageCode() from failing for offline site
parent
03902699
Changes
1
Hide whitespace changes
Inline
Side-by-side
docs/js/extra.js
View file @
2f8b3536
...
...
@@ -181,7 +181,7 @@ var nodemcu = nodemcu || {};
// path is like /en/<branch>/<lang>/build/ -> extract 'lang'
// split[0] is an '' because the path starts with the separator
selectedLanguageCode
=
path
.
split
(
'
/
'
)[
3
];
}
else
{
}
else
if
(
!
window
.
location
.
href
.
startsWith
(
'
file://
'
))
{
// path is like /<lang>/build/ -> extract 'lang'
selectedLanguageCode
=
path
.
substr
(
1
,
2
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment