mirror of
https://github.com/scratchfoundation/scratch-www.git
synced 2024-11-26 00:58:14 -05:00
Don’t prefix localhost
with .
Need to special case localhost so that changing language works when running locally.
This commit is contained in:
parent
92a729e9c8
commit
ad2f0fa4e2
1 changed files with 5 additions and 1 deletions
|
@ -21,7 +21,11 @@ class LanguageChooser extends React.Component {
|
|||
]);
|
||||
}
|
||||
handleSetLanguage (name, value) {
|
||||
jar.set('scratchlanguage', value, {domain: `.${window.location.hostname}`});
|
||||
let opts = {};
|
||||
if (window.location.hostname !== 'localhost') {
|
||||
opts = {domain: `.${window.location.hostname}`};
|
||||
}
|
||||
jar.set('scratchlanguage', value, opts);
|
||||
window.location.reload();
|
||||
}
|
||||
render () {
|
||||
|
|
Loading…
Reference in a new issue