summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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