diff --git a/src/routes/console/project-[project]/messaging/create.svelte b/src/routes/console/project-[project]/messaging/create.svelte index 73211dbfef..7cf554d2a0 100644 --- a/src/routes/console/project-[project]/messaging/create.svelte +++ b/src/routes/console/project-[project]/messaging/create.svelte @@ -49,8 +49,8 @@ break; case MessagingProviderType.Push: { - const file = $messageParams[MessagingProviderType.Push].file; - const fileCompoundId = `${file.bucketId}:${file.$id}`; + const file = $messageParams[MessagingProviderType.Push]?.file; + const fileCompoundId = file ? `${file.bucketId}:${file.$id}` : undefined; const customData: Record = {}; const { data } = $messageParams[MessagingProviderType.Push]; if (data && data.length > 0) { diff --git a/src/routes/console/project-[project]/messaging/wizard/store.ts b/src/routes/console/project-[project]/messaging/wizard/store.ts index db3bc3e415..4e79c9e656 100644 --- a/src/routes/console/project-[project]/messaging/wizard/store.ts +++ b/src/routes/console/project-[project]/messaging/wizard/store.ts @@ -23,8 +23,8 @@ export type SMSMessageParams = MessageParams & { export type PushMessageParams = MessageParams & { title: string; body: string; - file: Models.File; data: [string, string][]; + file: Models.File; action?: string; icon?: string; sound?: string;