mirror of
https://github.com/zadam/trilium.git
synced 2026-05-06 12:26:21 +02:00
fix(standalone): OPML export failing
This commit is contained in:
@@ -166,6 +166,7 @@ function createAsyncRoute(router: BrowserRouter) {
|
||||
* Used for route handlers (like image routes) that write directly to the response.
|
||||
*/
|
||||
function createMockExpressResponse() {
|
||||
const chunks: string[] = [];
|
||||
const res = {
|
||||
_used: false,
|
||||
_status: 200,
|
||||
@@ -192,6 +193,15 @@ function createMockExpressResponse() {
|
||||
res._used = true;
|
||||
res._status = code;
|
||||
return res;
|
||||
},
|
||||
write(chunk: string) {
|
||||
chunks.push(chunk);
|
||||
return true;
|
||||
},
|
||||
end() {
|
||||
res._used = true;
|
||||
res._body = chunks.join("");
|
||||
return res;
|
||||
}
|
||||
};
|
||||
return res;
|
||||
|
||||
Reference in New Issue
Block a user