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

fixes console log warnings when bid is null or NaN #2010

Merged
merged 2 commits into from
Oct 5, 2018

Conversation

jessopb
Copy link
Member

@jessopb jessopb commented Oct 5, 2018

No description provided.

Copy link

@neb-b neb-b left a comment

Choose a reason for hiding this comment

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

I think the only thing we should need it the value={bid || ''}

Could you revert the other changes and add a changelog update?

@@ -19,7 +19,6 @@ import LicenseType from './internal/license-type';
type Props = {
publish: PublishParams => void,
filePath: ?string,
bid: ?number,
Copy link

Choose a reason for hiding this comment

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

We should keep this

Copy link
Member Author

@jessopb jessopb Oct 5, 2018

Choose a reason for hiding this comment

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

On this, there was duplicate bid: ?number, and bid: number in the same Props {}. I removed the "?maybe" one and checked for errors as I published.

@@ -170,7 +169,7 @@ class PublishForm extends React.PureComponent<Props> {
const totalAvailableBidAmount = previousBidAmount + balance;

let bidError;
if (bid === 0) {
if (!bid) {
Copy link

Choose a reason for hiding this comment

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

I think there will be a bidError when it's empty if we do this.

@neb-b neb-b merged commit ea30dc6 into lbryio:master Oct 5, 2018
@tzarebczan tzarebczan added the hacktoberfest Welcome to Hacktoberfest label Oct 31, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
hacktoberfest Welcome to Hacktoberfest
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants