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

Fixing an issue with Attirbute.Number transforming null values into 0 #469

Merged
merged 2 commits into from
Nov 28, 2023

Conversation

kraju3
Copy link
Contributor

@kraju3 kraju3 commented Jun 16, 2023

Description

There was a bug that caused null values to return 0 for Attribute.Number. This will check if the value is null or not and return only if it's a valid Numbrer. This will avoid Number(null) returning 0.

@codecov
Copy link

codecov bot commented Jun 16, 2023

Codecov Report

Merging #469 (acd2b28) into main (c4a54f5) will not change coverage.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main     #469   +/-   ##
=======================================
  Coverage   91.70%   91.70%           
=======================================
  Files          62       62           
  Lines        2641     2641           
  Branches      481      481           
=======================================
  Hits         2422     2422           
  Misses        218      218           
  Partials        1        1           
Impacted Files Coverage Δ
src/models/attributes.ts 95.65% <100.00%> (ø)

@kraju3 kraju3 requested a review from mrashed-dev June 22, 2023 20:02
Copy link
Collaborator

@mrashed-dev mrashed-dev left a comment

Choose a reason for hiding this comment

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

LGTM!

@mrashed-dev mrashed-dev merged commit 5764869 into main Nov 28, 2023
4 checks passed
@mrashed-dev mrashed-dev deleted the TSDK-584 branch November 28, 2023 16:24
@mrashed-dev mrashed-dev mentioned this pull request Nov 28, 2023
mrashed-dev added a commit that referenced this pull request Nov 29, 2023
# Changelog
* Add support for logging (#508, #456)
* Nullify replyToMessageId is an empty string (#484, #509)
* Nullify visibility if visibility is an empty string (#507, #470)
* Fix numbers defaulting to 0 instead of null (#469)
* Fix parsing of Number arrays (#503, #502)
* Fix configured timeout not being used (#506, #489)
* Bump `node-fetch` dependency from 2.6.1 to 2.6.12 (#504, #496)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants