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: constrainer can be override by other instance #255

Closed
wants to merge 2 commits into from
Closed

fix: constrainer can be override by other instance #255

wants to merge 2 commits into from

Conversation

climba03003
Copy link
Contributor

Fixes: #254

We should not override the prototype again and again.

test/issue-254.test.js Outdated Show resolved Hide resolved
Copy link
Collaborator

@ivan-tymoshenko ivan-tymoshenko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really like throwing handlers through node constructors. Please give me some time, I want to check if we can do something with it.

return {
get: (secret) => { return secrets[secret] || null },
set: (secret, store) => { secrets[secret] = store },
del: (secret) => { delete secrets[secret] },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We don't use del and empty methods anymore.

@ivan-tymoshenko
Copy link
Collaborator

As I said I don't really want to have a constrainer in the node constructor. What do you think about this solution #256

@climba03003
Copy link
Contributor Author

Closed in favour of #256

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.

constraints will be overrided when multiple router created
3 participants