From 2d44ad2f8f5c9a165865f6a69f80794c1839543c Mon Sep 17 00:00:00 2001 From: Dan Parizher <105245560+danparizher@users.noreply.github.com> Date: Sat, 4 Oct 2025 07:40:37 -0400 Subject: [PATCH] [`ty`] Fix playground crashes when accessing vendored files with leading slashes (#20661) --- playground/ty/src/Playground.tsx | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/playground/ty/src/Playground.tsx b/playground/ty/src/Playground.tsx index 5ace4b9134..1391ee548f 100644 --- a/playground/ty/src/Playground.tsx +++ b/playground/ty/src/Playground.tsx @@ -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;