Skip to content

Commit

Permalink
fix: merge as it is fully removed in 0.28.0 ramda/ramda#3218
Browse files Browse the repository at this point in the history
  • Loading branch information
mudassir-hafeez committed Jul 3, 2024
1 parent 9793d03 commit b7420a2
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions static/js/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,11 @@ export function csrfSafeMethod(method: string): boolean {
return /^(GET|HEAD|OPTIONS|TRACE)$/.test(method);
}

const headers = R.merge({ headers: {} });
const headers = R.mergeRight({ headers: {} });

const method = R.merge({ method: "GET" });
const method = R.mergeRight({ method: "GET" });

const credentials = R.merge({ credentials: "same-origin" });
const credentials = R.mergeRight({ credentials: "same-origin" });

const setWith = R.curry((path, valFunc, obj) => R.set(path, valFunc(), obj));

Expand All @@ -40,7 +40,7 @@ const csrfToken = R.unless(
setWith(R.lensPath(["headers", "X-CSRFToken"]), () => getCookie("csrftoken")),
);

const jsonHeaders = R.merge({
const jsonHeaders = R.mergeRight({
headers: {
"Content-Type": "application/json",
Accept: "application/json",
Expand Down

0 comments on commit b7420a2

Please sign in to comment.