Showing 3 of 3 total issues
Function focusByFirstOfHeader
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring. Open
export const focusByFirstOfHeader = (timeout = 1) => { setTimeout(() => { let element = document.getElementsByTagName('h1'); if (element) { element = element[1]; } if (!element) { element = document.getElementsByTagName('h2')[0]; }
- Read upRead up
- Create a ticketCreate a ticket
Function propSort
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring. Open
export const propSort = (propName, nestedPropName) => (a, b) => { let A = a[propName]; if (nestedPropName) { A = a[propName][nestedPropName]; } A = A.toString().toLowerCase(); let B = b[propName];
- Read upRead up
- Create a ticketCreate a ticket
Function difference
has a Cognitive Complexity of 7 (exceeds 5 allowed). Consider refactoring. Open
export const difference = (base, object) => transform(object, (result, value, key) => { /* eslint-disable no-param-reassign */ if (!isEqual(value, base[key])) { result[key] = isObject(value) && isObject(base[key]) ? difference(base[key], value) :
- Read upRead up
- Create a ticketCreate a ticket