diff --git a/app/assets/javascripts/discourse/lib/theme-selector.js.es6 b/app/assets/javascripts/discourse/lib/theme-selector.js.es6 index de7a81daf93..295f8664dd6 100644 --- a/app/assets/javascripts/discourse/lib/theme-selector.js.es6 +++ b/app/assets/javascripts/discourse/lib/theme-selector.js.es6 @@ -13,9 +13,9 @@ function currentThemeKey() { export function selectDefaultTheme(key) { if (key) { - $.cookie('preview_style', key); + $.cookie('preview_style', key, {path: '/', expires: 9999}); } else { - $.cookie('preview_style', null); + $.cookie('preview_style', null, {path: '/', expires: 1}); } }