1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-23 11:56:00 +01:00

only show warning if there is a row

This commit is contained in:
Kyle Spearrin 2018-10-11 16:49:11 -04:00
parent 90f723316a
commit 9fa99f3a6e

View File

@ -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;