mirror of
https://github.com/urbit/shrub.git
synced 2024-11-27 18:34:48 +03:00
link fe: fully account for the "number as string" case
The Number() usage is sane, but should be scoped around the variable by itself. Previously a string of "3" would lead to a Number("31") call, which is not the intended behavior here. Also stops passing a {} in if the actual number is unknown.
This commit is contained in:
parent
e74ec92c4c
commit
9b9692e7f1
@ -12,7 +12,7 @@ export class CommentsPagination extends Component {
|
||||
? "dib"
|
||||
: "dn";
|
||||
|
||||
let nextDisplay = (Number(props.commentPage + 1) < Number(props.total))
|
||||
let nextDisplay = ((Number(props.commentPage) + 1) < Number(props.total))
|
||||
? "dib"
|
||||
: "dn";
|
||||
|
||||
|
@ -48,7 +48,7 @@ export class Comments extends Component {
|
||||
|
||||
let total = !!props.comments
|
||||
? props.comments.totalPages
|
||||
: {};
|
||||
: 1;
|
||||
|
||||
let commentsList = Object.keys(commentsPage)
|
||||
.map((entry) => {
|
||||
|
Loading…
Reference in New Issue
Block a user