mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-23 00:22:56 +01:00
clone _extraLibs before handing it out, fixes #5
This commit is contained in:
parent
13035407db
commit
5767393c5b
1 changed files with 5 additions and 1 deletions
|
|
@ -32,7 +32,11 @@ export class LanguageServiceDefaultsImpl implements monaco.languages.typescript.
|
|||
}
|
||||
|
||||
get extraLibs(): { [path: string]: string; } {
|
||||
return Object.freeze(this._extraLibs);
|
||||
const result = Object.create(null);
|
||||
for (var key in this._extraLibs) {
|
||||
result[key] = this._extraLibs[key];
|
||||
}
|
||||
return Object.freeze(result);
|
||||
}
|
||||
|
||||
addExtraLib(content: string, filePath?: string): IDisposable {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue