-
Notifications
You must be signed in to change notification settings - Fork 9
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
support __skipRender #11
Conversation
} | ||
yield this.render(view, data); | ||
} else { | ||
console.log(this.state) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remove console.log
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if (data.__skipRender)
is better than if (!data.__skipRender)
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fixed
if (!view || IS_JSON_RE.test(this.path)) { | ||
return this.body = data; | ||
if (data.__skipRender) { | ||
yield* next; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
return yield* next
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no, need to inject
@fengmk2 any other problem? |
+1 |
Great job! |
koa-mock@1.4.0 |
sometime, we use js to render pages.
when mock, we need to add
__scene
toreferer
, but don't mock the view render, only mock ajax render