homarr-labs / homarr

Prefer that for-in loops should include an if statement JS-0051
Anti-pattern
Minor
1 occurrence in this check
Wrap the body of a for-in loop in an if statement with a hasOwnProperty guard
129  const obj = {} as Record<keyof TOptions, unknown>;
130  const options = optionsCallback(optionsFactory);
131
132  for (const key in options) {133    obj[key] = {134      ...configuration?.[key],135      ...options[key],136    };137  }138
139  return obj as {
140    [key in keyof TOptions]: TOptions[key] & FieldConfiguration<TOptions>;