From 5f034ee4edc645a385e6455df6bd9f065d3f7e8c Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Mon, 27 Jul 2020 17:17:27 -0600 Subject: [PATCH] Ensure arrayHasDiff returns a boolean This is just maintenance noticed while debugging. --- src/utils/arrays.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/utils/arrays.ts b/src/utils/arrays.ts index 2a5b1b5f16..ea29ad182a 100644 --- a/src/utils/arrays.ts +++ b/src/utils/arrays.ts @@ -53,6 +53,9 @@ export function arrayHasDiff(a: any[], b: any[]): boolean { // an element from the other. if (b.some(i => !a.includes(i))) return true; if (a.some(i => !b.includes(i))) return true; + + // if all the keys are common, say so + return false } else { return true; // different lengths means they are naturally diverged }