Skip to content

Commit

Permalink
fix weird esbuild error
Browse files Browse the repository at this point in the history
  • Loading branch information
zardoy committed Mar 10, 2023
1 parent 994019e commit b8fa504
Showing 1 changed file with 11 additions and 7 deletions.
18 changes: 11 additions & 7 deletions src/vueVolarSupport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,15 @@ export default () => {
}

const isConfigValueChanged = (id: string) => {
const config = vscode.workspace.getConfiguration('')
const userValue = config.get<string>(id)
if (userValue === config.inspect(id)!.defaultValue) return false
// means that value was set by us programmatically, let's update it
// eslint-disable-next-line @typescript-eslint/no-require-imports
if (userValue?.startsWith(require('path').join(extensionCtx.extensionPath, '../..'))) return false
return true
if (process.env.PLATFORM !== 'web') {
const config = vscode.workspace.getConfiguration('')
const userValue = config.get<string>(id)
if (userValue === config.inspect(id)!.defaultValue) return false
// means that value was set by us programmatically, let's update it
// eslint-disable-next-line @typescript-eslint/no-require-imports
if (userValue?.startsWith(require('path').join(extensionCtx.extensionPath, '../..'))) return false
return true
}

return undefined
}

0 comments on commit b8fa504

Please sign in to comment.