fastify-txstate 3.2.8 → 3.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/index.js +1 -1
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -130,7 +130,7 @@ class Server {
|
|
|
130
130
|
* convert all nulls to undefined before fastify validates.
|
|
131
131
|
*/
|
|
132
132
|
this.app.addHook('preSerialization', async (req, res, payload) => {
|
|
133
|
-
return (0, txstate_utils_1.destroyNulls)(payload);
|
|
133
|
+
return req.routeSchema.response ? (0, txstate_utils_1.destroyNulls)(payload) : payload;
|
|
134
134
|
});
|
|
135
135
|
if (!config.skipOriginCheck && !process.env.SKIP_ORIGIN_CHECK) {
|
|
136
136
|
this.setValidOrigins([...((_d = config.validOrigins) !== null && _d !== void 0 ? _d : []), ...((_f = (_e = process.env.VALID_ORIGINS) === null || _e === void 0 ? void 0 : _e.split(',')) !== null && _f !== void 0 ? _f : [])]);
|