lint(curly): consistent use of curly brackets in codebase (#3584)
This commit is contained in:
1 parent
9ae3d9f769
commit
5d435424e2
113 files changed
+1501
-1056
No files matched your search
@@ -107,8 +107,12 @@ const itemGenerator = (props: any) => {
|
||||
props.formatTime = formatDICOMTime;
|
||||
props.formatPN = formatPN;
|
||||
props.formatNumberPrecision = formatNumberPrecision;
|
||||
if (condition && !condition(props)) return null;
|
||||
if (!contents && !valueFunc) return null;
|
||||
if (condition && !condition(props)) {
|
||||
return null;
|
||||
}
|
||||
if (!contents && !valueFunc) {
|
||||
return null;
|
||||
}
|
||||
const value = valueFunc && valueFunc(props);
|
||||
const contentsValue = (contents && contents(props)) || [
|
||||
{ className: 'mr-1', value: title },
|
||||
|
||||
+9
-3
@@ -1,10 +1,16 @@
|
||||
const listComponentGenerator = props => {
|
||||
const { list, itemGenerator } = props;
|
||||
if (!list) return;
|
||||
if (!list) {
|
||||
return;
|
||||
}
|
||||
return list.map(item => {
|
||||
if (!item) return;
|
||||
if (!item) {
|
||||
return;
|
||||
}
|
||||
const generator = item.generator || itemGenerator;
|
||||
if (!generator) throw new Error(`No generator for ${item}`);
|
||||
if (!generator) {
|
||||
throw new Error(`No generator for ${item}`);
|
||||
}
|
||||
return generator({ ...props, item });
|
||||
});
|
||||
};
|
||||
|
||||
Reference in new issue
Block a user