mirror of
https://github.com/danny-avila/LibreChat.git
synced 2026-01-01 08:08:49 +01:00
fix: add optional chaining to prevent runtime errors in various components
This commit is contained in:
parent
670f9b8daf
commit
bd3f5f1e77
5 changed files with 5 additions and 5 deletions
|
|
@ -33,7 +33,8 @@ const ModelParameters: React.FC<ModelParametersProps> = ({
|
|||
const rangeRef = useRef<HTMLInputElement>(null);
|
||||
|
||||
const id = `model-parameter-${ariaLabel.toLowerCase().replace(/\s+/g, '-')}`;
|
||||
const displayLabel = label.startsWith('com_') ? localize(label as TranslationKeys) : label;
|
||||
const displayLabel =
|
||||
label && label.startsWith('com_') ? localize(label as TranslationKeys) : label;
|
||||
|
||||
const getDecimalPlaces = (num: number) => {
|
||||
const match = ('' + num).match(/(?:\.(\d+))?(?:[eE]([+-]?\d+))?$/);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue