summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorKamran Ahmed <kamranahmed.se@gmail.com>2018-08-27 23:21:34 +0500
committerKamran Ahmed <kamranahmed.se@gmail.com>2018-08-27 23:21:34 +0500
commitdb2a1632fe449c602086dd06fae366a0c84622d2 (patch)
tree2c8c814e5b0d656d847164815e90e1a24571d4f1 /src
parentLoad next batch and group headings (diff)
downloadgithunt-db2a1632fe449c602086dd06fae366a0c84622d2.tar.gz
Fix - Redux keeps persisting the groups
Diffstat (limited to 'src')
-rw-r--r--src/redux/github/transform.js10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/redux/github/transform.js b/src/redux/github/transform.js
index af788a6..0602907 100644
--- a/src/redux/github/transform.js
+++ b/src/redux/github/transform.js
@@ -15,6 +15,16 @@ const GithubTransform = createTransform(
};
}
+ // Keep the first group only to avoid overflowing the storage
+ if (inboundState.repositories && inboundState.repositories.length > 1) {
+ inboundState = {
+ ...inboundState,
+ repositories: [
+ inboundState.repositories[0]
+ ]
+ };
+ }
+
return inboundState;
},
// transform state being rehydrated