Skip to content
This repository was archived by the owner on Jul 17, 2024. It is now read-only.

Commit 2c031fe

Browse files
authored
fix(create.ts): Remove spaces from url input (#102)
1 parent 8ccc21a commit 2c031fe

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

apps/extension/src/actions/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ export default async function createPresence(context: ExtensionContext) {
128128
validate: async (input: string) => {
129129
if (!input) return "Website URL cannot be empty";
130130
const schemaRes = validator.validate(
131-
input.includes(",") ? input.split(",") : input,
131+
input.includes(",") ? input.split(",").map((url) => url.trim()) : input,
132132
schema.properties.url
133133
);
134134

packages/cli/src/actions/create.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ const res = await inquirer.prompt<{
115115

116116
let urls: string[] | string;
117117

118-
if (input.split(",").length > 1) urls = input.split(",");
118+
if (input.split(",").length > 1) urls = input.split(",").map((url) => url.trim());
119119
else urls = input;
120120

121121
const schemaRes = v.validate(urls, schema.properties.url);

0 commit comments

Comments
 (0)