I tried passing some cookie values to the growthbo...
# give-feedback
I tried passing some cookie values to the growthbook attributes so that I can exclude users with those cookies. I was very surprised that attributes with a value of undefined passed the override rule test “if cookie1 exists”. Is this the intended behavior?
Copy code
// js-cookie returns a string value of the cookie or undefined if it doesn't exist
const thirdPartyCookies = {
  cookie1: Cookies.get("cookie1"),
  cookie2: Cookies.get("cookie2"),
  cookie3: Cookies.get("cookie3"),

  id: svc.userId,
Hi Jesse, thanks for reaching out! I’ll double check with Engineering and reply here with an update as soon as I can
Hi again, Jesse, would you be able to send me a screenshot of where you have this configured?
Yes. This was on a feature rule. Cookie name is auid
Hi Jesse, my apologies for the delay here. We actually had to do quite a bit of digging to try to sort out why this might be happening.
Where we've gotten to is that we might be missing a test case in our Javascript SDK for this. The
is javascript-specific. Most languages don't have an equivalent to that, so I don't think it's part of our shared test suite between all of the SDKs. We would have to write a custom test case just for the javascript SDK. I'm going to create a GitHub issue for this and let our engineering team know about it. I'll share the link to the GH issue so you can follow it
Okay! Thanks for getting back. I was able to work around by simply iterating over the object keys and deleting any with undefined values.
You're welcome! That sounds like a good approach for the time being. I will create the issue tomorrow and share the link here. Have a good evening!
Thanks. You too
😊 1