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

this.state.route cannot get custom error in validate #34

Closed
miserylee opened this issue Oct 27, 2016 · 6 comments
Closed

this.state.route cannot get custom error in validate #34

miserylee opened this issue Oct 27, 2016 · 6 comments
Labels

Comments

@miserylee
Copy link

function makeSpecExposer(spec) {
  var defn = clone.clonePrototype(spec);
  return function* specExposer(next) {
    this.state.route = defn;
    yield* next;
  };
}

Why use clone to expose specs? It will produce some trouble like 'custom error will transform to undefined'.

@miserylee
Copy link
Author

pvorb/clone#67

@aheckmann
Copy link
Member

we clone b/c a user could modify the spec in the route which leads to unpredictable behavior.

@miserylee
Copy link
Author

It's a issue of node-clone, I have make a PR to it, but nobody response. pvorb/clone#68
Please take a look if that's useful :)

@miserylee
Copy link
Author

pvorb/clone#68 The PR is merged! Please update the clone to v2.1.0

@miserylee
Copy link
Author

@aheckmann Please update the clone dependencies

@reyawn
Copy link
Collaborator

reyawn commented Mar 20, 2017

@miserylee I noticed that clone has been updated to 2.1.1 already so going to close this.

@reyawn reyawn closed this as completed Mar 20, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants