Skip to content

Redundant return in sync examples? #332

@Fdawgs

Description

@Fdawgs

Prerequisites

  • I have written a descriptive issue title
  • I have searched existing issues to ensure the issue has not already been raised

Issue

From looking at git blame, the returns were added as part of #140, however I have been getting away with not returning reply.sendFile() when using fastify-static since at least Fastify v3.20.2 i.e:

fastify
	.get('/another/path', (req, reply) => {
		reply.sendFile('myHtml.html');
	})
	.get('/other-other-benz', (req, reply) => {
		reply.sendFile('myHtml.html');
	});

Outside of returning the reply in an async handler, I don't think they're needed?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions