fix: error on file_list without sse

Massimo Melina committed Feb 7, 2022 at 12:37 UTC 4e33f0e8e182d7c5fe7f79a1f2b1b269d01c16c3
1 file changed +1 -1
src/api.file_list.ts
+1 -1
@@ -60,7 +60,7 @@ export const file_list:ApiHandler = async ({ path, offset, limit, search, omit,
60 if (limit && !--limit)
61 break
62 }
63 - emitter.emit('end')
63 + emitter?.emit('end')
64 return list
65 }
66 }