Skip to content
Snippets Groups Projects
Commit a4b9bc80 authored by Tainan Felipe's avatar Tainan Felipe
Browse files

add comment explaining reducer

parent 84b2342f
No related branches found
No related tags found
No related merge requests found
......@@ -35,6 +35,8 @@ export function joinRouteHandler(nextState, replace, callback) {
const metakeys = metadata.length
? metadata.reduce((acc, meta) => {
const key = Object.keys(meta).shift();
/* this reducer tranform array of objects in a sigle object and
force the metadata a be boolean value */
return { ...acc, [key]: JSON.parse(meta[key]) };
}) : {};
SessionStorage.setItem(METADATA_KEY, metakeys);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment