Skip to content

Commit

Permalink
Fix: Check if object is extensible
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Mar 18, 2024
1 parent 2802d51 commit 4796cb8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/extension.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ function updatePythonPath (): void {
for (const pythonSubConf of ['autoComplete.extraPaths', 'analysis.extraPaths']) {
const extraPaths = pythonConfig.get<string[]>(pythonSubConf) ?? []
for (const pathToAdd of [pathToBitbakeLib, pathToPokyMetaLib]) {
if (!extraPaths.includes(pathToAdd)) {
if (!extraPaths.includes(pathToAdd) && Object.isExtensible(extraPaths)) {
extraPaths.push(pathToAdd)
}
void pythonConfig.update(pythonSubConf, extraPaths, vscode.ConfigurationTarget.Workspace)
Expand Down

0 comments on commit 4796cb8

Please sign in to comment.