Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork2.8k
fix(website): update hash value if problem occurs due to ts version error#11292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
base:main
Are you sure you want to change the base?
Changes fromall commits
File filter
Filter by extension
Conversations
Uh oh!
There was an error while loading.Please reload this page.
Jump to
Uh oh!
There was an error while loading.Please reload this page.
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -7,7 +7,7 @@ import semverSatisfies from 'semver/functions/satisfies'; | ||
import type { createTypeScriptSandbox } from '../../vendor/sandbox'; | ||
import type { CreateLinter } from '../linter/createLinter'; | ||
import type { PlaygroundSystem } from '../linter/types'; | ||
import type {ConfigModel,RuleDetails } from '../types'; | ||
import type { CommonEditorProps } from './types'; | ||
import rootPackageJson from '../../../../../package.json'; | ||
@@ -23,6 +23,7 @@ export interface SandboxServicesProps { | ||
ruleDetails: RuleDetails[], | ||
tsVersions: readonly string[], | ||
) => void; | ||
readonly setState: (value: Partial<ConfigModel>) => void; | ||
readonly ts: string; | ||
} | ||
@@ -140,6 +141,12 @@ export const useSandboxServices = ( | ||
}) | ||
.catch((err: unknown) => { | ||
if (err instanceof Error) { | ||
if ( | ||
err.message === | ||
'Could not get all the dependencies of sandbox set up!' | ||
Member
| ||
) { | ||
props.setState({ ts: process.env.TS_VERSION }); | ||
} | ||
setServices(err); | ||
} else { | ||
setServices(new Error(String(err))); | ||