Reactotron: Log 0 (Zero) results in ¯\_(ツ)_/¯

Created on 16 May 2017  Â·  7Comments  Â·  Source: infinitered/reactotron

If you do console.tron.log(0) will log ¯\_(ツ)_/¯

And that's not what I want. Is there a way to modify this behavior ?

But I'm more than sure that it does that to any falsy value

Thanks!

bug

Most helpful comment

Should be fixed in the latest 1.11 release.

Give that a go if you don't mind! Feel free to re-open if i'm lying to you.

All 7 comments

same me, it logs to console, only strings

Ya it sucks... falsy is getting owned by JSON.stringify. Getting the serialization just right has been a challenge.

It's a balance between correctness (both values and circular reference unwrapping) and performance.

Serialization happens here and here.

You can also opt out of the extra "safe" serialization checks by saying { safeRecursion: false } in the configure() call to Reactotron (probably in your ReactotronConfig.js.

I'm going to be taking a closer look at some 3rd party libraries for serialization once we remove socket.io in version 2.

Sorry for the issue!

Should be fixed in the latest 1.11 release.

Give that a go if you don't mind! Feel free to re-open if i'm lying to you.

Thanks @skellock , here's a screenshot:

screen shot 2017-05-24 at 10 53 15

@Fenwil : Ugh you're right, I missed this case.

As a workaround for now, console.tron.log({ zero })

I need to remove the fallbacks from here.

I'll get a patch up shortly. Thx man.

You're welcome, thank you!

Fix is now live in 1.11.1. That's a lot of 1's.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

scally picture scally  Â·  5Comments

dhruwal picture dhruwal  Â·  3Comments

tolu360 picture tolu360  Â·  5Comments

nonameolsson picture nonameolsson  Â·  5Comments

davidjb picture davidjb  Â·  5Comments