mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
Clear the start command when the framework or adapter changes
A start command names an entrypoint belonging to one framework. Carrying it across a switch submits it against a runtime that has no such entrypoint, and a switch to static leaves a command the form no longer shows. Reset it alongside the other framework-derived fields, and send it only for the ssr adapter, matching the fallbackFile line beside it.
This commit is contained in:
1 parent
6e64d0ce57
commit
8fab5505c9
1 file changed
+3
-1
+3
-1
@@ -92,6 +92,7 @@
|
||||
outputDirectory = data.outputDirectory;
|
||||
adapter = data.key as Adapter;
|
||||
fallback = data.fallbackFile;
|
||||
startCommand = '';
|
||||
} else if (hasFrameworkSelectionChanged) {
|
||||
const data =
|
||||
selectedFramework.adapters.find((a) => a.key === adapter) ??
|
||||
@@ -110,6 +111,7 @@
|
||||
fallback = isOriginalAdapter
|
||||
? (site?.fallbackFile ?? data.fallbackFile)
|
||||
: data.fallbackFile;
|
||||
startCommand = isOriginalAdapter ? (site?.startCommand ?? '') : '';
|
||||
}
|
||||
|
||||
lastFrameworkAdapterKey = `${selectedFramework.key}:${adapter ?? ''}`;
|
||||
@@ -167,7 +169,7 @@
|
||||
timeout: site.timeout || undefined,
|
||||
installCommand: installCommand || undefined,
|
||||
buildCommand: buildCommand || undefined,
|
||||
startCommand: startCommand || undefined,
|
||||
startCommand: adptr?.key === 'ssr' ? startCommand || undefined : undefined,
|
||||
outputDirectory: outputDirectory || undefined,
|
||||
buildRuntime: (site?.buildRuntime as BuildRuntime) || undefined,
|
||||
adapter: (adptr?.key as Adapter) || undefined,
|
||||
|
||||
Reference in new issue
Block a user