Commit 2f8b3536 authored by Marcel Stör's avatar Marcel Stör
Browse files

Prevent determineSelectedLanguageCode() from failing for offline site

parent 03902699
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment