chore(prettier): full repo linting and code reformatting once and for all (#3627)
This commit is contained in:
1 parent
01500a2d4c
commit
9045ddaedc
656 files changed
+21737
-20628
No files matched your search
@@ -35,9 +35,7 @@ export default function cleanDenaturalizedDataset(
|
||||
}
|
||||
): any {
|
||||
if (Array.isArray(obj)) {
|
||||
const newAry = obj.map(o =>
|
||||
isPrimitive(o) ? o : cleanDenaturalizedDataset(o, options)
|
||||
);
|
||||
const newAry = obj.map(o => (isPrimitive(o) ? o : cleanDenaturalizedDataset(o, options)));
|
||||
return newAry;
|
||||
} else if (isPrimitive(obj)) {
|
||||
return obj;
|
||||
@@ -47,31 +45,19 @@ export default function cleanDenaturalizedDataset(
|
||||
delete obj[key].Value;
|
||||
} else if (Array.isArray(obj[key].Value) && obj[key].vr) {
|
||||
if (obj[key].Value.length === 1 && obj[key].Value[0].BulkDataURI) {
|
||||
dicomWebUtils.fixBulkDataURI(
|
||||
obj[key].Value[0],
|
||||
options,
|
||||
options.dataSourceConfig
|
||||
);
|
||||
dicomWebUtils.fixBulkDataURI(obj[key].Value[0], options, options.dataSourceConfig);
|
||||
|
||||
obj[key].BulkDataURI = obj[key].Value[0].BulkDataURI;
|
||||
|
||||
// prevent mixed-content blockage
|
||||
if (
|
||||
window.location.protocol === 'https:' &&
|
||||
obj[key].BulkDataURI.startsWith('http:')
|
||||
) {
|
||||
obj[key].BulkDataURI = obj[key].BulkDataURI.replace(
|
||||
'http:',
|
||||
'https:'
|
||||
);
|
||||
if (window.location.protocol === 'https:' && obj[key].BulkDataURI.startsWith('http:')) {
|
||||
obj[key].BulkDataURI = obj[key].BulkDataURI.replace('http:', 'https:');
|
||||
}
|
||||
delete obj[key].Value;
|
||||
} else if (vrNumerics.includes(obj[key].vr)) {
|
||||
obj[key].Value = obj[key].Value.map(v => +v);
|
||||
} else {
|
||||
obj[key].Value = obj[key].Value.map(entry =>
|
||||
cleanDenaturalizedDataset(entry, options)
|
||||
);
|
||||
obj[key].Value = obj[key].Value.map(entry => cleanDenaturalizedDataset(entry, options));
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user