Skip to content

Conversation

dplewis
Copy link
Member

@dplewis dplewis commented Jan 9, 2020

Closes: #1055

This PR just forces sessionToken null to be undefined when intializing the client.

If anybody knows how a sessionToken can be null instead of a string, '', or undefined, let me know.

@codecov
Copy link

codecov bot commented Jan 9, 2020

Codecov Report

Merging #1058 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #1058   +/-   ##
=======================================
  Coverage   92.18%   92.18%           
=======================================
  Files          54       54           
  Lines        5146     5146           
  Branches     1148     1149    +1     
=======================================
  Hits         4744     4744           
  Misses        402      402
Impacted Files Coverage Δ
src/LiveQueryClient.js 87.76% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update dd36493...dc488ce. Read the comment docs.

@dplewis dplewis requested review from acinader and davimacedo January 9, 2020 00:58
@dplewis
Copy link
Member Author

dplewis commented Jan 10, 2020

@acinader How does this look?

@acinader
Copy link
Contributor

acinader commented Jan 11, 2020

hm. does the test case fail without the this.sessionToken = sessionToken || undefined;

if i've got it right, your code is changing null to undefined. null errors, undefined doesn't?

it's kidna an odd construct cause the first time i read it i saw, if undefined, make undefined, but now i see its if falsey, make undefined.

@dplewis
Copy link
Member Author

dplewis commented Jan 11, 2020

The test does fail without this fix. undefined doesn’t error.

I can’t think of a case where sessionToken could be null.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants