gururise nsarrazin HF staff commited on
Commit
fead39f
1 Parent(s): 3c372b8

[fix] If APP_BASE is empty, go to '/' instead of an empty string. (#785)

Browse files

* if APP_BASE is empty, go to '/' instead of an empty string.

* run prettier

---------

Co-authored-by: Nathan Sarrazin <[email protected]>

src/routes/assistant/[assistantId]/+page.svelte CHANGED
@@ -96,7 +96,7 @@
96
  // `result` is an `ActionResult` object
97
  if (result.type === "success") {
98
  $settings.activeModel = data.assistant._id;
99
- goto(`${base}`);
100
  } else {
101
  await applyAction(result);
102
  }
 
96
  // `result` is an `ActionResult` object
97
  if (result.type === "success") {
98
  $settings.activeModel = data.assistant._id;
99
+ goto(`${base}` || "/");
100
  } else {
101
  await applyAction(result);
102
  }