Skip to content

Commit

Permalink
fix(regression): fix outline crash!
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Jan 19, 2024
1 parent 3dff0af commit 845c4ff
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.json
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@
"unicorn/switch-case-braces": "off",
"@typescript-eslint/consistent-type-imports": "off",
"@typescript-eslint/ban-types": "off",
"sonarjs/prefer-single-boolean-return": "off"
"sonarjs/prefer-single-boolean-return": "off",
"unicorn/no-typeof-undefined": "off" // todo disable globally
},
"overrides": [
{
Expand Down
2 changes: 1 addition & 1 deletion typescript/src/getPatchedNavTree.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ type AdditionalFeatures = Record<'arraysTuplesNumberedItems', boolean>

const getPatchedNavModule = (additionalFeatures: AdditionalFeatures): { getNavigationTree(...args) } => {
// what is happening here: grabbing & patching NavigationBar module contents from actual running JS
const tsServerPath = __TS_SEVER_PATH__ === undefined ? require.main!.filename : __TS_SEVER_PATH__
const tsServerPath = typeof __TS_SEVER_PATH__ === 'undefined' ? require.main!.filename : __TS_SEVER_PATH__
// current lib/tsserver.js
const mainScript = nodeModules!.fs.readFileSync(tsServerPath, 'utf8')
type PatchData = {
Expand Down

0 comments on commit 845c4ff

Please sign in to comment.