Don’t prefix localhost with .

Need to special case localhost so that changing language works when running locally.
This commit is contained in:
Chris Garrity 2020-01-23 16:56:12 -05:00
parent 92a729e9c8
commit ad2f0fa4e2

View file

@ -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 () {