Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix check of restify vs express #222

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ClementParis016
Copy link

Restify's createServer method allows a name option to customize the server name.

If it's value is changed from "restify", the following check would think it's running under Express:

if (app.name === 'restify' && self.method === 'delete')
self.method = 'del';

And then the server would crash because app.delete is not a function in Restify.

This PR takes a safer approach by simply checking if app.delete is undefined.

@tommybananas
Copy link

Hello, please consider contributing this change to finale, a sequelize 4.x fork of epilogue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants