Convert annotation properties startLine/startColumn to the correct type, omit if not present.

fix
This commit is contained in:
David Anson
2022-02-05 17:18:07 -08:00
parent c3b2de4a57
commit 744f913a12
2 changed files with 16 additions and 8 deletions
+8 -4
View File
@@ -31671,17 +31671,21 @@ const logError = (error) => {
const [
,
file,
startLine,
startColumn,
startLineString,
startColumnString,
,
title
] = match;
const startLine = Number(startLineString);
annotation = {
title,
file,
startLine,
startColumn
startLine
};
if (startColumnString) {
// @ts-ignore
annotation.startColumn = Number(startColumnString);
}
}
core.error(error, annotation);
};
+8 -4
View File
@@ -14,17 +14,21 @@ const logError = (error) => {
const [
,
file,
startLine,
startColumn,
startLineString,
startColumnString,
,
title
] = match;
const startLine = Number(startLineString);
annotation = {
title,
file,
startLine,
startColumn
startLine
};
if (startColumnString) {
// @ts-ignore
annotation.startColumn = Number(startColumnString);
}
}
core.error(error, annotation);
};