You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
export const setMainBodyClass = className => {
if (className && className.trim().indexOf(' ') >= 0) {
throw Error('You can only set one main body class');
}
const { classList } = document.body;
if (
className &&
currentBodyClass === className &&
classList.contains(className)
) {
return;
}
if (currentBodyClass && classList.contains(currentBodyClass)) {
classList.remove(currentBodyClass);
currentBodyClass = null;
}
if (className && !classList.contains(className)) {
classList.add(className);
currentBodyClass = className;
}
};
line with single return raises:
TypeError: Cannot read property 'callee' of null
Occurred while linting
at Object.isDestructuredFromPragmaImport (.../node_modules/eslint-plugin-react/lib/util/Components.js:348:33)
at Object.isCreateElement (.../node_modules/eslint-plugin-react/lib/util/Components.js:393:16)
at Object.isReturningJSX (.../node_modules/eslint-plugin-react/lib/util/Components.js:467:47)
at Object.ReturnStatement (.../node_modules/eslint-plugin-react/lib/util/Components.js:942:18)
at updatedRuleInstructions.(anonymous function) (.../node_modules/eslint-plugin-react/lib/util/Components.js:970:43)
at listeners.(anonymous function).forEach.listener (.../node_modules/eslint/lib/linter/safe-emitter.js:45:58)
at Array.forEach (<anonymous>)
at Object.emit (.../node_modules/eslint/lib/linter/safe-emitter.js:45:38)
at NodeEventGenerator.applySelector (.../node_modules/eslint/lib/linter/node-event-generator.js:254:26)
at NodeEventGenerator.applySelectors (.../node_modules/eslint/lib/linter/node-event-generator.js:283:22)
The text was updated successfully, but these errors were encountered:
At version 7.20.5
this code
line with single
return
raises:TypeError: Cannot read property 'callee' of null
The text was updated successfully, but these errors were encountered: