File tree Expand file tree Collapse file tree
packages/stack-shared/src/config Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -812,6 +812,8 @@ export async function sanitizeEnvironmentConfig<T extends EnvironmentRenderedCon
812812export async function sanitizeOrganizationConfig ( config : OrganizationRenderedConfigBeforeSanitization ) {
813813 assertNormalized ( config ) ;
814814 const prepared = await sanitizeEnvironmentConfig ( config ) ;
815+ const themes : typeof prepared . emails . themes = config . emails . server . isShared ? DEFAULT_EMAIL_THEMES : prepared . emails . themes ;
816+ const templates : typeof prepared . emails . templates = config . emails . server . isShared ? DEFAULT_EMAIL_TEMPLATES : prepared . emails . templates ;
815817 const products = typedFromEntries ( typedEntries ( prepared . payments . products ) . map ( ( [ key , product ] ) => {
816818 const isAddOnTo = product . isAddOnTo === false ?
817819 false as const :
@@ -835,7 +837,9 @@ export async function sanitizeOrganizationConfig(config: OrganizationRenderedCon
835837 ...prepared ,
836838 emails : {
837839 ...prepared . emails ,
838- selectedThemeId : has ( prepared . emails . themes , prepared . emails . selectedThemeId ) ? prepared . emails . selectedThemeId : DEFAULT_EMAIL_THEME_ID ,
840+ selectedThemeId : has ( themes , prepared . emails . selectedThemeId ) ? prepared . emails . selectedThemeId : DEFAULT_EMAIL_THEME_ID ,
841+ themes,
842+ templates,
839843 } ,
840844 payments : {
841845 ...prepared . payments ,
You can’t perform that action at this time.
0 commit comments