mirror of
https://github.com/microsoft/monaco-editor.git
synced 2025-12-22 15:05:39 +01:00
Merge pull request #29 from Geloosa/extra-libs-filepath
more safe extra lib filePath generation
This commit is contained in:
commit
e9381f692d
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ export class LanguageServiceDefaultsImpl implements monaco.languages.typescript.
|
|||
|
||||
addExtraLib(content: string, filePath?: string): IDisposable {
|
||||
if (typeof filePath === 'undefined') {
|
||||
filePath = `ts:extralib-${Date.now()}`;
|
||||
filePath = `ts:extralib-${Math.random().toString(36).substring(2, 15)}`;
|
||||
}
|
||||
|
||||
if (this._extraLibs[filePath]) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue