@samitouri / QOS-React / commits / 1bea469db0

Remove unneeded variable

Dan Abramov committed Apr 25, 2019 at 17:46 UTC 1bea469db0bdedd99fcc7257aa41f794c3fa4093
1 file changed +1 -3
src/backend/renderer.js
+1 -3
@@ -592,7 +592,6 @@ export function attach(
592 let pendingOperationsQueue: Array<Uint32Array> | null = [];
593 let pendingStringTable: Map<string, number> = new Map();
594 let pendingStringTableLength = 0;
595 - let pendingStringTableCounter = 0;
595
596 function pushOperation(op: number): void {
597 if (__DEV__) {
@@ -690,7 +689,6 @@ export function attach(
689 pendingSimulatedUnmountedIDs.length = 0;
690 pendingStringTable.clear();
691 pendingStringTableLength = 0;
693 - pendingStringTableCounter = 0;
692 }
693
694 function getStringID(str: string | null): number {
@@ -701,7 +699,7 @@ export function attach(
699 if (existingID !== undefined) {
700 return existingID;
701 }
704 - let id = ++pendingStringTableCounter;
702 + const id = pendingStringTable.size + 1;
703 pendingStringTable.set(str, id);
704 // The string table total length needs to account
705 // both for the string length, and for the array item