Merge pull request #4151 from LJNeon/script-editor-fix

UI: Remove extra / from open script tab when files are in a folder
This commit is contained in:
hydroflame 2022-09-27 17:50:32 -03:00 committed by GitHub
commit 7ce1adddce
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -803,7 +803,7 @@ export function Root(props: IProps): React.ReactElement {
...colorProps,
};
const scriptTabText = `${hostname}:~/${fileName} ${dirty(index)}`;
const scriptTabText = `${hostname}:~${fileName.startsWith("/") ? "" : "/"}${fileName} ${dirty(index)}`;
return (
<Draggable
key={fileName + hostname}