fix: douban movie allow empty/set default score 0#2458
Merged
Conversation
DIYgod
requested changes
Jun 22, 2019
|
|
||
| module.exports = async (ctx) => { | ||
| const score = parseFloat(ctx.params.score, 10); | ||
| const score = parseFloat(ctx.params.score) ? parseFloat(ctx.params.score) : 0; |
Owner
There was a problem hiding this comment.
这有什么意义...
而且应该写 parseFloat(ctx.params.score) || 0
Contributor
Author
There was a problem hiding this comment.
文档里有条路由不写分数返回全部。不加那句的话出不来
Owner
There was a problem hiding this comment.
懂了,那应该写成 parseFloat(ctx.params.score) || 0
不然 parseFloat 要多执行一次
DIYgod
requested changes
Jun 22, 2019
|
|
||
| module.exports = async (ctx) => { | ||
| const score = parseFloat(ctx.params.score, 10); | ||
| const score = parseFloat(ctx.params.score) : 0; |
| .map((i) => { | ||
| const item = $(i); | ||
| const itemScore = parseFloat(item.attr('data-score'), 10); | ||
| const itemScore = parseFloat(item.attr('data-score')) ? 10; |
DIYgod
approved these changes
Jun 22, 2019
Owner
|
Merged, thanks! |
iplusx
added a commit
to iplusx/RSSHub
that referenced
this pull request
Jun 22, 2019
* master: (153 commits) chore(deps): update dependency puppeteer to v1.18.0 (DIYgod#2454) fix: douban movie allow empty/set default score 0 (DIYgod#2458) feat: add 8btc (DIYgod#2462) feat: nautilus (topics) (DIYgod#2459) chore(deps): update dependency nock to v11.0.0-beta.20 (DIYgod#2453) chore(deps): update dependency query-string to v6.8.1 (DIYgod#2451) feat: 笔趣阁全文 (DIYgod#2450) feat: replace iTunes link (DIYgod#2448) fix: better debugging experience with cluster (DIYgod#2447) fix: wrong path judgement feat: wrong path error feat: debug info for hot route and path chore(deps): update dependency form-data to v2.4.0 (DIYgod#2444) fix: DIYgod#2442 (DIYgod#2443) feat: use cluster fix: undefined git hash in docker docs: add crawlerBadge for earthquake, close DIYgod#2436 fix: bilibili live allow empty (DIYgod#2438) feat: add new route flyertea (DIYgod#2431) fix: B站非默认收藏夹失效 (DIYgod#2433) ...
iplusx
added a commit
to iplusx/RSSHub
that referenced
this pull request
Jun 22, 2019
* master: (200 commits) chore(deps): update dependency puppeteer to v1.18.0 (DIYgod#2454) fix: douban movie allow empty/set default score 0 (DIYgod#2458) feat: add 8btc (DIYgod#2462) feat: nautilus (topics) (DIYgod#2459) chore(deps): update dependency nock to v11.0.0-beta.20 (DIYgod#2453) chore(deps): update dependency query-string to v6.8.1 (DIYgod#2451) feat: 笔趣阁全文 (DIYgod#2450) feat: replace iTunes link (DIYgod#2448) fix: better debugging experience with cluster (DIYgod#2447) fix: wrong path judgement feat: wrong path error feat: debug info for hot route and path chore(deps): update dependency form-data to v2.4.0 (DIYgod#2444) fix: DIYgod#2442 (DIYgod#2443) feat: use cluster fix: undefined git hash in docker docs: add crawlerBadge for earthquake, close DIYgod#2436 fix: bilibili live allow empty (DIYgod#2438) feat: add new route flyertea (DIYgod#2431) fix: B站非默认收藏夹失效 (DIYgod#2433) ...
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fix #2457