FIX: maintain theme preview when refreshing (#6356)

This commit is contained in:
Osama Sayegh 2018-09-02 10:23:46 +03:00 committed by Sam
parent 4194d1f875
commit 8e70b82baa
1 changed files with 2 additions and 2 deletions

View File

@ -12,8 +12,8 @@ export default {
window.location.search.indexOf("?preview_theme_id=") === 0
) {
// force preview theme id to always be carried along
const themeId = window.location.search.slice(19).split("&")[0];
if (themeId.match(/^[a-z0-9-]+$/i)) {
const themeId = parseInt(window.location.search.slice(18).split("&")[0]);
if (!isNaN(themeId)) {
const patchState = function(f) {
const patched = window.history[f];