Skip to content

Commit d225fcb

Browse files
committed
Update data function wrapper.
1 parent 6f77c52 commit d225fcb

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
@@ -246,8 +246,6 @@ function makeWrappedDataFunction(
246246
return origFn.call(this, args);
247247
}
248248

249-
let res: Response | AppData;
250-
251249
return startSpan(
252250
{
253251
op: `function.remix.${name}`,
@@ -288,7 +286,7 @@ function makeWrappedDataFunction(
288286

289287
span?.end();
290288

291-
res = await origFn.call(this, args);
289+
return origFn.call(this, args);
292290
},
293291
err => {
294292
const isRemixV2 = FUTURE_FLAGS?.v2_errorBoundary || remixVersion === 2;
@@ -301,9 +299,6 @@ function makeWrappedDataFunction(
301299
captureRemixServerException(err, name, args.request);
302300
}
303301
},
304-
() => {
305-
return res;
306-
},
307302
);
308303
},
309304
);

0 commit comments

Comments
 (0)