Skip to content

Commit

Permalink
Use empty set and require transform return string
Browse files Browse the repository at this point in the history
  • Loading branch information
scotttrinh committed Nov 6, 2023
1 parent b1a6ac5 commit c6e6d31
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions shared/studio/tabs/auth/state/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ export class AuthAdminState extends Model({
return null;
},
(urls) => {
if (urls === null) return null;
if (urls === null) return "{}";
const urlList = urls.split("\n").filter((str) => str.trim() !== "");
return `{${urlList.map((u) => `'${u}'`).join(", ")}}`;
}
Expand Down Expand Up @@ -443,7 +443,7 @@ function createDraftAuthConfig(
name: string,
type: string,
validate: (val: string | null) => string | null,
transform: (val: string | null) => string | null = JSON.stringify
transform: (val: string | null) => string = JSON.stringify
) {
@model(`DraftAuthConfig/${name}`)
class DraftAuthConfig extends Model({
Expand Down

0 comments on commit c6e6d31

Please sign in to comment.