1
Fork 0
mirror of https://github.com/diced/zipline.git synced 2025-04-11 23:31:17 -05:00

fix: it's a little shorter, didn't realize this works too

This commit is contained in:
Jay 2025-02-07 11:18:19 -08:00
parent b6898b0ad8
commit b8e29fe839
No known key found for this signature in database
GPG key ID: 97C2E533F17AF0EB

View file

@ -6,8 +6,8 @@ function notFound(fastify: FastifyInstance, _: unknown, done: () => void) {
done();
function notFound(this: FastifyReply) {
if (process.env.NODE_ENV == 'development') return this.code(404).send('not found :(');
if (this.server.config.features.headless) return this.callNotFound();
if (this.server.config.features.headless || process.env.NODE_ENV == 'development')
return this.callNotFound();
return this.server.nextServer.render404(this.request.raw, this.raw);
}
}