diff options
| author | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-27 23:21:34 +0500 |
|---|---|---|
| committer | Kamran Ahmed <kamranahmed.se@gmail.com> | 2018-08-27 23:21:34 +0500 |
| commit | db2a1632fe449c602086dd06fae366a0c84622d2 (patch) | |
| tree | 2c8c814e5b0d656d847164815e90e1a24571d4f1 /src | |
| parent | Load next batch and group headings (diff) | |
| download | githunt-db2a1632fe449c602086dd06fae366a0c84622d2.tar.gz | |
Fix - Redux keeps persisting the groups
Diffstat (limited to 'src')
| -rw-r--r-- | src/redux/github/transform.js | 10 |
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 |
