Skip to content
This repository has been archived by the owner on Jul 6, 2020. It is now read-only.

Commit

Permalink
Fix mistaken variable name
Browse files Browse the repository at this point in the history
  • Loading branch information
kitten committed Dec 3, 2019
1 parent 0c8ee06 commit a1e8efe
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/populateExchange.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ export const populateExchange = ({
return op;
}

const activeSelections = Object.create(null);
const activeSelections: TypeFragmentMap = Object.create(null);
for (const name in typeFragments) {
activeSelections[name] = typeFragments[name].filter(s =>
activeOperations.has(s.key)
Expand Down Expand Up @@ -92,7 +92,7 @@ export const populateExchange = ({

for (let i = 0, l = newSelections.length; i < l; i++) {
const { selections, type } = newSelections[i];
const current = newSelections[type] || (newSelections[type] = []);
const current = typeFragments[type] || [];
const entry: TypeFragment = {
key,
fragment: {
Expand All @@ -114,6 +114,7 @@ export const populateExchange = ({
};

current.push(entry);
typeFragments[type] = current;
}
};

Expand Down

0 comments on commit a1e8efe

Please sign in to comment.