From 9fa99f3a6ecf7c4a14e5d7271562b3908cf64728 Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Thu, 11 Oct 2018 16:49:11 -0400 Subject: [PATCH] only show warning if there is a row --- src/importers/baseImporter.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/importers/baseImporter.ts b/src/importers/baseImporter.ts index ca642666cf..b70a566a59 100644 --- a/src/importers/baseImporter.ts +++ b/src/importers/baseImporter.ts @@ -80,8 +80,10 @@ export abstract class BaseImporter { }); if (result.errors != null && result.errors.length > 0) { result.errors.forEach((e) => { - // tslint:disable-next-line - console.warn('Error parsing row ' + e.row + ': ' + e.message); + if (e.row != null) { + // tslint:disable-next-line + console.warn('Error parsing row ' + e.row + ': ' + e.message); + } }); } return result.data && result.data.length > 0 ? result.data : null;