Skip to content

Commit 845c4ff

Browse files
committed
fix(regression): fix outline crash!
1 parent 3dff0af commit 845c4ff

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.eslintrc.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
"unicorn/switch-case-braces": "off",
3434
"@typescript-eslint/consistent-type-imports": "off",
3535
"@typescript-eslint/ban-types": "off",
36-
"sonarjs/prefer-single-boolean-return": "off"
36+
"sonarjs/prefer-single-boolean-return": "off",
37+
"unicorn/no-typeof-undefined": "off" // todo disable globally
3738
},
3839
"overrides": [
3940
{

typescript/src/getPatchedNavTree.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ type AdditionalFeatures = Record<'arraysTuplesNumberedItems', boolean>
1010

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

0 commit comments

Comments
 (0)