fix: update dependencies to latest
This commit is contained in:
@ -35,7 +35,11 @@ export const CreateGuild: React.FC = () => {
|
||||
AxiosResponse<{ guild: GuildComplete }>
|
||||
>('/guilds', { name: formData.name, description: formData.description })
|
||||
const guildId = data.guild.id
|
||||
const channelId = data.guild.channels[0].id
|
||||
const channel = data.guild.channels[0]
|
||||
if (channel == null) {
|
||||
throw new Error('No channel found')
|
||||
}
|
||||
const channelId = channel.id
|
||||
await router.push(`/application/${guildId}/${channelId}`)
|
||||
return null
|
||||
} catch (error) {
|
||||
|
@ -82,7 +82,7 @@ export const GuildSettings: React.FC = () => {
|
||||
) => {
|
||||
setFetchState('loading')
|
||||
const files = event?.target?.files
|
||||
if (files != null && files.length === 1) {
|
||||
if (files != null && files.length === 1 && files[0] != null) {
|
||||
const file = files[0]
|
||||
const formData = new FormData()
|
||||
formData.append('icon', file)
|
||||
|
@ -54,7 +54,7 @@ export const SendMessage: React.FC<SendMessageProps> = (props) => {
|
||||
event
|
||||
) => {
|
||||
const files = event?.target?.files
|
||||
if (files != null && files.length === 1) {
|
||||
if (files != null && files.length === 1 && files[0] != null) {
|
||||
const file = files[0]
|
||||
const formData = new FormData()
|
||||
formData.append('file', file)
|
||||
|
@ -149,7 +149,7 @@ export const UserSettings: React.FC = () => {
|
||||
) => {
|
||||
setFetchState('loading')
|
||||
const files = event?.target?.files
|
||||
if (files != null && files.length === 1) {
|
||||
if (files != null && files.length === 1 && files[0] != null) {
|
||||
const file = files[0]
|
||||
const formData = new FormData()
|
||||
formData.append('logo', file)
|
||||
|
Reference in New Issue
Block a user