Skip to content

Commit 53db64e

Browse files
committed
Update data function wrapper.
1 parent 8982064 commit 53db64e

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

packages/remix/src/utils/instrumentServer.ts

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -248,8 +248,6 @@ function makeWrappedDataFunction(
248248
return origFn.call(this, args);
249249
}
250250

251-
let res: Response | AppData;
252-
253251
return startSpan(
254252
{
255253
op: `function.remix.${name}`,
@@ -290,7 +288,7 @@ function makeWrappedDataFunction(
290288

291289
span?.end();
292290

293-
res = await origFn.call(this, args);
291+
return origFn.call(this, args);
294292
},
295293
err => {
296294
const isRemixV2 = FUTURE_FLAGS?.v2_errorBoundary || remixVersion === 2;
@@ -303,9 +301,6 @@ function makeWrappedDataFunction(
303301
captureRemixServerException(err, name, args.request);
304302
}
305303
},
306-
() => {
307-
return res;
308-
},
309304
);
310305
},
311306
);

0 commit comments

Comments
 (0)