fastify-txstate 3.2.9 → 3.2.10

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.
Files changed (2) hide show
  1. package/lib/index.js +2 -1
  2. package/package.json +1 -1
package/lib/index.js CHANGED
@@ -130,7 +130,8 @@ 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 req.routeSchema.response ? (0, txstate_utils_1.destroyNulls)(payload) : payload;
133
+ var _a;
134
+ return ((_a = req.routeSchema) === null || _a === void 0 ? void 0 : _a.response) ? (0, txstate_utils_1.destroyNulls)(payload) : payload;
134
135
  });
135
136
  if (!config.skipOriginCheck && !process.env.SKIP_ORIGIN_CHECK) {
136
137
  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 : [])]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fastify-txstate",
3
- "version": "3.2.9",
3
+ "version": "3.2.10",
4
4
  "description": "A small wrapper for fastify providing a set of common conventions & utility functions we use.",
5
5
  "exports": {
6
6
  ".": {