Skip to content

Commit

Permalink
Revert process check (#1784) (#1790)
Browse files Browse the repository at this point in the history
## Summary:

Reverts #1784 because it broke (static) Storybook

Author: handeyeco

Reviewers: jeremywiebe

Required Reviewers:

Approved By: jeremywiebe

Checks: ✅ Publish npm snapshot (ubuntu-latest, 20.x), ✅ Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ Cypress (ubuntu-latest, 20.x), ✅ Check builds for changes in size (ubuntu-latest, 20.x), ✅ Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, 🚫 Publish npm snapshot (ubuntu-latest, 20.x), 🚫 Check for .changeset entries for all changed files (ubuntu-latest, 20.x), 🚫 Cypress (ubuntu-latest, 20.x), 🚫 Check builds for changes in size (ubuntu-latest, 20.x), 🚫 Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), ✅ gerald, 🚫 Publish npm snapshot (ubuntu-latest, 20.x), 🚫 Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), 🚫 Check builds for changes in size (ubuntu-latest, 20.x), 🚫 Cypress (ubuntu-latest, 20.x), 🚫 Check for .changeset entries for all changed files (ubuntu-latest, 20.x), ✅ gerald, 🚫 Publish npm snapshot (ubuntu-latest, 20.x), 🚫 Lint, Typecheck, Format, and Test (ubuntu-latest, 20.x), 🚫 Cypress (ubuntu-latest, 20.x), 🚫 Check for .changeset entries for all changed files (ubuntu-latest, 20.x), 🚫 Check builds for changes in size (ubuntu-latest, 20.x), ✅ Publish Storybook to Chromatic (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1790
  • Loading branch information
handeyeco authored Oct 23, 2024
1 parent a8f0165 commit c27ee11
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
"@khanacademy/perseus": patch
---

Check for process before accessing properties on it
Revert process check PR (#1784)
3 changes: 1 addition & 2 deletions packages/math-input/src/components/i18n-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ type I18nContextType = {
// @ts-expect-error - TS2322 - Type 'Context<{ strings: {}; locale: string; }>' is not assignable to type 'Context<I18nContextType>'.
export const MathInputI18nContext: React.Context<I18nContextType> =
React.createContext(
typeof process !== "undefined" &&
(process.env.NODE_ENV === "test" || process.env.STORYBOOK)
process.env.NODE_ENV === "test" || process.env.STORYBOOK
? {
strings: mockStrings,
locale: "en",
Expand Down
3 changes: 1 addition & 2 deletions packages/perseus/src/components/i18n-context.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ type I18nContextType = {
// @ts-expect-error - TS2322 - Type 'Context<{ strings: {}; locale: string; }>' is not assignable to type 'Context<I18nContextType>'.
export const PerseusI18nContext: React.Context<I18nContextType> =
React.createContext(
typeof process !== "undefined" &&
(process.env.NODE_ENV === "test" || process.env.STORYBOOK)
process.env.NODE_ENV === "test" || process.env.STORYBOOK
? {
strings: mockStrings,
locale: "en",
Expand Down

0 comments on commit c27ee11

Please sign in to comment.