Skip to content

Fix for success handler for gdpr-privacy-preferences-frm submission#244

Open
codereviewvideos wants to merge 1 commit intotrewknowledge:developfrom
codereviewvideos:patch-1
Open

Fix for success handler for gdpr-privacy-preferences-frm submission#244
codereviewvideos wants to merge 1 commit intotrewknowledge:developfrom
codereviewvideos:patch-1

Conversation

@codereviewvideos
Copy link

  • Removes unused local variable
  • Found response.status is undefined, so use xhr.status check instead - however may not be needed
  • Force window.location.reload to load page from server, rather than local cache

It may be that the 200 === xhr.status check is not required. This is the success handler function, so a successful outcome is assumed(?)

I haven't updated the else / displayNotification function, as I'm not sure what the expected contents of the response.data... object would be. Perhaps hardcoded with translated error strings?

…ssion

* Removes unused local variable
* Found `response.status` is undefined, so use `xhr.status` check instead - however may not be needed
* Force `window.location.reload` to load page from server, rather than local cache

It may be that the `200 === xhr.status` check is not required. This is the success handler function, so a successful outcome is assumed(?)

I haven't updated the `else` / `displayNotification` function, as I'm not sure what the expected contents of the `response.data...` object would be. Perhaps hardcoded with translated error strings?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant