-
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
bugSomething isn't workingSomething isn't working
Description
Problem:
Invalid fallback handling is silent in production/CI, which can hide failures in static builds or Storybook. Warnings should be visible in all environments for better debugging.
References:
- src/contexts/FigmaVarsProvider.tsx
Citations:
- src/contexts/FigmaVarsProvider.tsx
Code Snippets
src/contexts/FigmaVarsProvider.tsx:
// Invalid structure - log warning but don't crash
if (process.env.NODE_ENV !== 'production') {
console.warn('[figma-vars-hooks] fallbackFile object does not match expected Figma Variables API response structure. ...')
}tests/FigmaVarsProvider.test.tsx:
it('does not log warnings in production mode for invalid fallback', () => {
process.env.NODE_ENV = 'production'
// ...
expect(console.warn).not.toHaveBeenCalled()
})Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working