Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Constance <[email protected]>
  • Loading branch information
JasonStoltz and Constance authored Nov 4, 2020
1 parent 701951d commit be76a85
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ describe('LogRetentionLogic', () => {

LogRetentionLogic.actions.saveLogRetention(ELogRetentionOptions.Analytics, true);

expect(http.put).toHaveBeenCalledWith(`/api/app_search/log_settings`, {
expect(http.put).toHaveBeenCalledWith('/api/app_search/log_settings', {
body: JSON.stringify({
analytics: {
enabled: true,
Expand Down Expand Up @@ -341,7 +341,7 @@ describe('LogRetentionLogic', () => {

LogRetentionLogic.actions.fetchLogRetention();

expect(http.get).toHaveBeenCalledWith(`/api/app_search/log_settings`);
expect(http.get).toHaveBeenCalledWith('/api/app_search/log_settings');
await promise;
expect(LogRetentionLogic.actions.updateLogRetention).toHaveBeenCalledWith(
TYPICAL_CLIENT_LOG_RETENTION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ export const LogRetentionLogic = kea<MakeLogicType<ILogRetentionValues, ILogRete
}
},
toggleLogRetention: ({ option }) => {
const logRetention = values.logRetention && values.logRetention[option];
const logRetention = values.logRetention?.[option];

// If the user has found a way to call this before we've retrieved
// log retention settings from the server, short circuit this and return early
Expand Down

0 comments on commit be76a85

Please sign in to comment.