Applied changes to solve several issues about typescript strict mode

This commit is contained in:
Alexander Cerutti
2021-12-23 19:46:29 +01:00
parent ef20bc5a44
commit cf8a467266
6 changed files with 56 additions and 38 deletions

View File

@@ -30,14 +30,14 @@ export function parse(buffer: Buffer) {
/** EOF */
blockEndPoint === fileAsString.length
) {
let match: RegExpMatchArray;
let match: RegExpMatchArray | null;
const section = fileAsString.substring(
blockStartPoint,
blockEndPoint + 1,
);
if ((match = section.match(translationRowRegex))) {
if ((match = section.match(translationRowRegex)) && match.groups) {
const {
groups: { key, value },
} = match;