diff --git a/reflex/.templates/web/utils/state.js b/reflex/.templates/web/utils/state.js index 0fe7648ba..417032912 100644 --- a/reflex/.templates/web/utils/state.js +++ b/reflex/.templates/web/utils/state.js @@ -346,7 +346,7 @@ export const connect = async ( */ export const uploadFiles = async (handler, files, upload_id, on_upload_progress, socket) => { // return if there's no file to upload - if (files.length == 0) { + if (files === undefined || files.length === 0) { return false; }