Skip to content

Commit 571a063

Browse files
committed
chore: [sdk-1556] addressing some PR comments
1 parent 52a06eb commit 571a063

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

packages/sdk/shopify-oxygen/example/app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ const main = async () => {
4242

4343
miniOxygen.ready.then(() => {
4444
console.log('Oxygen worker is started...');
45-
console.log('Dispatching fetch every 5 seconds. Press "q" or Ctrl+C to quit...');
45+
console.log('Press "q" or Ctrl+C to quit...');
4646

4747
// Dispatch fetch every 5 seconds
4848
const interval = setInterval(() => {

packages/sdk/shopify-oxygen/example/src/index.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,10 @@ export default {
2222
await ldClient.waitForInitialization({ timeout: 10 });
2323
const flagValue = await ldClient.variation(flagKey, context, false);
2424

25+
// Flush events and close the client
26+
ldClient.flush();
27+
ldClient.close();
28+
2529
return new Response(JSON.stringify({ flagKey, flagValue }), { status: 200 });
2630
},
2731
};

0 commit comments

Comments
 (0)