mirror of https://github.com/astral-sh/ruff
[`ty`] Fix playground crashes when accessing vendored files with leading slashes (#20661)
This commit is contained in:
parent
2ce3aba458
commit
2d44ad2f8f
|
|
@ -100,6 +100,10 @@ export default function Playground() {
|
|||
setError("File names cannot start with '/'.");
|
||||
return;
|
||||
}
|
||||
if (newName.startsWith("vendored:")) {
|
||||
setError("File names cannot start with 'vendored:'.");
|
||||
return;
|
||||
}
|
||||
|
||||
const handle = files.handles[file];
|
||||
let newHandle: FileHandle | null = null;
|
||||
|
|
|
|||
Loading…
Reference in New Issue