diff --git a/src/components/languagechooser/languagechooser.jsx b/src/components/languagechooser/languagechooser.jsx index be6f78881..77f4fed72 100644 --- a/src/components/languagechooser/languagechooser.jsx +++ b/src/components/languagechooser/languagechooser.jsx @@ -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 () {