Fix assert not null lint warning (#2324)

This commit is contained in:
Lucas Bordeau
2023-11-03 11:08:14 +01:00
committed by GitHub
parent e3691ad143
commit cf8840dfec

View File

@ -15,7 +15,12 @@ export const convertFieldsToGraphQL = (
let fieldAlias = key;
if (fieldsMap.has(key)) {
const metadata = fieldsMap.get(key)!;
const metadata = fieldsMap.get(key);
if (!metadata) {
throw new Error(`Field ${key} not found in fieldsMap`);
}
const entries = Object.entries(metadata.targetColumnMap);
if (entries.length > 0) {