From 3ed3306101c228f77095955af2fe2a9b1e688b21 Mon Sep 17 00:00:00 2001 From: Duy Nguyen Date: Fri, 24 Jan 2025 20:30:42 +0700 Subject: [PATCH] fix tests --- actions/check-product-changes/poller.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/actions/check-product-changes/poller.js b/actions/check-product-changes/poller.js index 77f0392..7c5519c 100644 --- a/actions/check-product-changes/poller.js +++ b/actions/check-product-changes/poller.js @@ -24,8 +24,8 @@ function getFileLocation(stateKey) { return `${FILE_PREFIX}/${stateKey}.${FILE_EXT}`; } -async function loadState(storeCode, filesLib) { - const stateKey = storeCode ? `${storeCode}` : 'default'; +async function loadState(locale, filesLib) { + const stateKey = locale ? `${locale}` : 'default'; const fileLocation = getFileLocation(stateKey); const buffer = await filesLib.read(fileLocation); const stateData = buffer?.toString(); @@ -153,7 +153,7 @@ async function poll(params, filesLib) { const results = await Promise.all(locales.map(async (locale) => { const timings = new Timings(); // load state - const state = await loadState(storeCode, filesLib); + const state = await loadState(locale, filesLib); timings.sample('loadedState'); let context = { ...sharedContext };