Fix project not opening after creation

This commit is contained in:
Misode
2024-11-26 19:25:20 +01:00
parent e9280a7a54
commit 2f5f18777d
2 changed files with 17 additions and 21 deletions

View File

@@ -69,7 +69,7 @@ export function ProjectPanel() {
label: locale('project.rename_file'),
onAction: (uri: string) => {
const res = service?.dissectUri(uri)
if (res?.ok) {
if (res) {
// This is pretty hacky, improve this in the future when spyglass has a "constructUri" function
const oldSuffix = `${res.pack}/${res.namespace}/${res.path}/${res.identifier}${res.ext}`
if (!uri.endsWith(oldSuffix)) {