homeflowjs 0.10.5 → 0.10.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -8,7 +8,7 @@ const initCookieConsent = () => {
|
|
|
8
8
|
return newMessage;
|
|
9
9
|
};
|
|
10
10
|
|
|
11
|
-
const onCookiesPage = window.location.pathname.indexOf('cookie') >
|
|
11
|
+
const onCookiesPage = window.location.pathname.indexOf('cookie') > 0;
|
|
12
12
|
|
|
13
13
|
let cookieConsentConfig = Homeflow.get('cookie_consent_config');
|
|
14
14
|
|
package/package.json
CHANGED
package/reducers/app.reducer.js
CHANGED
|
@@ -18,6 +18,8 @@ const INITIAL_STATE = {
|
|
|
18
18
|
themeSettings: Homeflow.get('theme_settings_defaults') || {},
|
|
19
19
|
};
|
|
20
20
|
|
|
21
|
+
const defaultThemeSettingsObject = {};
|
|
22
|
+
|
|
21
23
|
const appReducer = (state = INITIAL_STATE, action) => {
|
|
22
24
|
switch (action.type) {
|
|
23
25
|
case AppActionTypes.SET_LOADING:
|
|
@@ -34,9 +36,15 @@ const appReducer = (state = INITIAL_STATE, action) => {
|
|
|
34
36
|
themePreferences: action.payload,
|
|
35
37
|
};
|
|
36
38
|
case AppActionTypes.SET_THEME_SETTINGS:
|
|
39
|
+
// Add default theme settings with values to set values Object
|
|
40
|
+
Object.keys(state.themeSettings).forEach((key) => {
|
|
41
|
+
if (state.themeSettings[key].default) {
|
|
42
|
+
defaultThemeSettingsObject[key] = state.themeSettings[key].default;
|
|
43
|
+
}
|
|
44
|
+
});
|
|
37
45
|
return {
|
|
38
46
|
...state,
|
|
39
|
-
themeSettings: action.payload,
|
|
47
|
+
themeSettings: { ...defaultThemeSettingsObject, ...action.payload },
|
|
40
48
|
};
|
|
41
49
|
case AppActionTypes.SET_AUTHENTICITY_TOKEN:
|
|
42
50
|
return {
|