Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
duynguyen committed Jan 24, 2025
1 parent 0f7d41b commit 3ed3306
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions actions/check-product-changes/poller.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down Expand Up @@ -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 };
Expand Down

0 comments on commit 3ed3306

Please sign in to comment.