Fix hostname check

This commit is contained in:
ernstmul committed 2025-03-31 11:40:26 +02:00
1 parent 831f162010
commit e0ab5522da
1 file changed
+3 -2
@@ -144,7 +144,8 @@ ${prefix}APPWRITE_PUBLIC_ENDPOINT = "${sdk.forProject.client.config.endpoint}"
$: selectedFrameworkIcon = selectedFramework ? selectedFramework.icon : NoFrameworkIcon;
async function createWebPlatform() {
hostnameError = !new RegExp(hostnameRegex).test(hostname);
hostnameError = hostname !== '' ? !new RegExp(hostnameRegex).test(hostname) : null;
if (hostnameError) {
return;
}
@@ -157,7 +158,7 @@ ${prefix}APPWRITE_PUBLIC_ENDPOINT = "${sdk.forProject.client.config.endpoint}"
`${selectedFramework.label} app`,
selectedFrameworkKey,
undefined,
hostname
hostname === '' ? undefined : hostname
);
isPlatformCreated = true;