nylas / nylas-nodejs

A NodeJS wrapper for the Nylas REST API for email, contacts, and calendar.
MIT License
169 stars 118 forks source link

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

Closed kraju3 closed 9 months ago

kraju3 commented 1 year ago

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[bot] commented 1 year ago

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%> (ø)