fix(core): Revert rule @typescript-eslint/prefer-nullish-coalescing

This commit is contained in:
Michael Kret
2023-01-19 14:37:19 +02:00
committed by GitHub
parent 9b032d68bc
commit e667df783c
190 changed files with 293 additions and 292 deletions

View File

@@ -158,7 +158,7 @@ export function formatSubmission(
.split('/')
.map((k) => _.trim(k, ' _'))
.join('.');
const leafKey = sanitizedKey.split('.').pop() ?? '';
const leafKey = sanitizedKey.split('.').pop() || '';
let format = 'string';
if (_.some(numberMasks, (mask) => matchWildcard(leafKey, mask))) {
format = 'number';
@@ -204,7 +204,7 @@ export async function downloadAttachments(
const credentials = await this.getCredentials('koBoToolboxApi');
// Look for attachment links - there can be more than one
const attachmentList = (submission._attachments ?? submission.attachments) as any[];
const attachmentList = (submission._attachments || submission.attachments) as any[];
if (attachmentList?.length) {
for (const [index, attachment] of attachmentList.entries()) {
@@ -266,7 +266,7 @@ export async function downloadAttachments(
if ('question' === options.binaryNamingScheme && relatedQuestion) {
binaryName = relatedQuestion;
} else {
binaryName = `${options.dataPropertyAttachmentsPrefixName ?? 'attachment_'}${index}`;
binaryName = `${options.dataPropertyAttachmentsPrefixName || 'attachment_'}${index}`;
}
binaryItem.binary![binaryName] = await this.helpers.prepareBinaryData(