We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Describe the bug It's not possible to disable tracking cookies using RenderContent.
RenderContent
To Reproduce Steps to reproduce the behavior:
<RenderContent ... canTrack={false} />
Expected behavior No builder.io cookies should be set.
Additional context I identified the problem to be this line:
builder/packages/sdks/src/components/render-content/render-content.lite.tsx
Line 111 in eb8c313
The expression always evaluates to true regardless of the value of props.canTrack since false || true is true.
true
props.canTrack
false || true
If the intention was to enable tracking by default, the code would have to be props.canTrack !== false for example, right?
props.canTrack !== false
Or if the intention was to convert it to a boolen, it would have to be Boolean(props.canTrack) or !!props.canTrack or similar.
Boolean(props.canTrack)
!!props.canTrack
The text was updated successfully, but these errors were encountered:
@samijaber can you please investigate?
Sorry, something went wrong.
@n4bb12 Thank you for being so thorough, this is probably the most helpful bug report I've received in a while!
@n4bb12 This is now fixed on SDK version 0.1.1.
0.1.1
Thanks!
samijaber
No branches or pull requests
Describe the bug
It's not possible to disable tracking cookies using
RenderContent
.To Reproduce
Steps to reproduce the behavior:
RenderContent
and disable tracking:<RenderContent ... canTrack={false} />
Expected behavior
No builder.io cookies should be set.
Additional context
I identified the problem to be this line:
builder/packages/sdks/src/components/render-content/render-content.lite.tsx
Line 111 in eb8c313
The expression always evaluates to
true
regardless of the value ofprops.canTrack
sincefalse || true
istrue
.If the intention was to enable tracking by default, the code would have to be
props.canTrack !== false
for example, right?Or if the intention was to convert it to a boolen, it would have to be
Boolean(props.canTrack)
or!!props.canTrack
or similar.The text was updated successfully, but these errors were encountered: