fix(voice-call): use ?? instead of || for TTS speed config#39340
fix(voice-call): use ?? instead of || for TTS speed config#39340Sirius1942 wants to merge 1 commit intoopenclaw:mainfrom
Conversation
Fixes openclaw#39285 Use nullish coalescing (??) instead of logical OR (||) for the speed default value. This prevents falsy numeric values (like 0) from being incorrectly replaced with the default. Consistent with fixes in openclaw#39190 and openclaw#39191.
Greptile SummaryThis PR makes two complementary changes to the OpenAI TTS provider:
The changes are low-risk and correct. The Confidence Score: 5/5
Last reviewed commit: ce3b961 |
Fixes #39285
Use nullish coalescing (
??) instead of logical OR (||) for the speed default value in the OpenAI TTS provider.Problem
The current code uses
||, which treats0as falsy. While the OpenAI API minimum speed is0.25, using??is more correct and consistent with the fixes in #39190 and #39191.Solution
Changed:
To:
Impact
Low — defensive fix for consistency and correctness.