When I use the color "orange" I always get an error which doesn't occure when I'm using the hex code instead:
The error message is shown in this picture:
The way I use "orange", another color and the hex code is shown here:
In summary it's no problem for me, because I use the hex code - unfortunately it used some time to locate the error.
Capitano
Best Answer
Fitbit Developers oversee the SDK and API forums. We're here to answer questions about Fitbit developer tools, assist with projects, and make sure your voice is heard by the development team.
Thanks for reporting this, I've filed a bug report.
This post may be a bit old to see replies, but if you are reading this, probably you faced this error today:
Unhandled exception: TypeError: Cannot set property to '"black"'. Invalid value: Expecting String ('color name' or '#hex') or Nu
Here is how I fixed it.
I was trying to set a background color on my app using ... something like this
let colorBackground ="black";
bg.style.fill = colorBackground;I got the error
Then after reading this page I changed it to something like
bg.style.fill = "fb-"+colorBackground; still no luck , got the similar error (not the same)
there is the catch , after reading it closely I observed 'fb-"black"' extra pair of " double quotes
'fb-"black"' so I wrote a regex to remove extra pair of " double quotes
bg.style.fill = colorBackground.replace(/^"(.*)"$/, '$1');
voila ! it worked. ✌️
Best Answer