From 46c1429dda6097f5e6555a0befbf8abdd10b6b3d Mon Sep 17 00:00:00 2001 From: Katie Rischpater <98350084+the-bay-kay@users.noreply.github.com> Date: Tue, 24 Oct 2023 15:43:39 -0700 Subject: [PATCH] Code format changes to unifiedDataLoader.ts --- www/js/unifiedDataLoader.ts | 17 ++++++++--------- 1 file changed, 8 insertions(+), 9 deletions(-) diff --git a/www/js/unifiedDataLoader.ts b/www/js/unifiedDataLoader.ts index f7036663a..81b156c7a 100644 --- a/www/js/unifiedDataLoader.ts +++ b/www/js/unifiedDataLoader.ts @@ -44,11 +44,10 @@ export const combinedPromises = function(promiseList: Array>, if (firstError && nextError) { reject([firstError, nextError]); } else { - logDebug("About to dedup localResult = "+firstResult.length - +"remoteResult = "+nextResult.length); - + logDebug(`About to dedup firstResult = ${firstResult.length}` + + ` nextResult = ${nextResult.length}`); const dedupedList = combiner(firstResult, nextResult); - logDebug("Deduped list = "+dedupedList.length); + logDebug(`Deduped list = ${dedupedList.length}`); resolve(dedupedList); } } @@ -94,11 +93,11 @@ export const combinedPromises = function(promiseList: Array>, export const getUnifiedDataForInterval = function(key: string, tq: TimeQuery, getMethod: (key: string, tq: TimeQuery, flag: boolean) => Promise) { const test = true; - const localPromise = getMethod(key, tq, test); + const getPromise = getMethod(key, tq, test); const remotePromise = getRawEntries([key], tq.startTs, tq.endTs) - .then(function(serverResponse: ServerData) { - return serverResponse.phone_data; - }); - var promiseList = [localPromise, remotePromise] + .then(function(serverResponse: ServerData) { + return serverResponse.phone_data; + }); + var promiseList = [getPromise, remotePromise] return combinedPromises(promiseList, combineWithDedup); }; \ No newline at end of file