Skip to content

Commit

Permalink
fix(serviceConfig): ent-4869 empty, null distinction (#917)
Browse files Browse the repository at this point in the history
* build, lower global caching to 15 seconds
* serviceConfig, Array toString masks null, use JSON stringify
  • Loading branch information
cdcabrera authored Apr 5, 2022
1 parent 2241ad1 commit 1af54fe
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ REACT_APP_UI_LOGGER_FILE=curiosity_debug_log_{0}.json
REACT_APP_UI_WINDOW_ID=curiosity

REACT_APP_AJAX_TIMEOUT=60000
REACT_APP_AJAX_CACHE=30000
REACT_APP_AJAX_CACHE=15000
REACT_APP_SELECTOR_CACHE=120000

REACT_APP_CONFIG_SERVICE_LOCALES_COOKIE=rh_locale
Expand Down
2 changes: 1 addition & 1 deletion src/services/common/serviceConfig.js
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ const axiosServiceCall = async (
`${window.btoa(
JSON.stringify(updatedConfig, (key, value) => {
if (value !== updatedConfig && _isPlainObject(value)) {
return (Object.entries(value).sort(([a], [b]) => a.localeCompare(b)) || []).toString();
return JSON.stringify(Object.entries(value).sort(([a], [b]) => a.localeCompare(b)) || []);
}
if (typeof value === 'function') {
return value.toString();
Expand Down

0 comments on commit 1af54fe

Please sign in to comment.