diff --git a/index.js b/index.js index a293d70..c4d6a91 100644 --- a/index.js +++ b/index.js @@ -36,7 +36,7 @@ function rowFuncs(buffer, offset, len, type, decoder) { case 'O': return parseFloat(textData, 10); case 'D': - return new Date(textData.slice(0, 4), parseInt(textData.slice(4, 6), 10) - 1, textData.slice(6, 8)); + return textData === "" ? "" : new Date(textData.slice(0, 4), parseInt(textData.slice(4, 6), 10) - 1, textData.slice(6, 8)); case 'L': return textData.toLowerCase() === 'y' || textData.toLowerCase() === 't'; default: