fix(statsig): improve plugin binding error handling during client ini…#2931
fix(statsig): improve plugin binding error handling during client ini…#2931
Conversation
…tialization - Updated startStatsig function to check if Storage.isReady is a function before calling it. - Moved plugin binding logic into a try/catch block to handle potential errors gracefully. - Ensured that client registration for logEvent occurs immediately after core initialization to prevent logging failures. Made-with: Cursor
Greptile SummaryThis PR improves resilience of the Statsig browser client initialization in two ways: it adds a Confidence Score: 4/5Safe to merge; changes are defensive improvements with no breaking logic. Only a P2 style suggestion was found (adding a warn log for the silent storage-wait skip). Both core fixes (typeof guard and client assignment ordering) are logically correct and well-scoped. No files require special attention. Important Files Changed
|
…tialization
Made-with: Cursor
What does this PR do?
(Provide a description of what this PR does.)
Test Plan
(Write your test plan here. If you changed any code, please provide us with clear instructions on how you verified your changes work.)
Related PRs and Issues
(If this PR is related to any other PR or resolves any issue or related to any issue link all related PR and issues here.)
Have you read the Contributing Guidelines on issues?
(Write your answer here.)