Skip to content

Commit

Permalink
ci: fix lint issue when casting error (#1324)
Browse files Browse the repository at this point in the history
  • Loading branch information
alvarowolfx authored Jan 17, 2024
1 parent 4ebe5da commit 5e3e540
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions src/bigquery.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2331,11 +2331,9 @@ export class BigQueryInt extends Number {
try {
return this.typeCastFunction!(this.value);
} catch (error) {
(
error as Error
).message = `integerTypeCastFunction threw an error:\n\n - ${
(error as Error).message
}`;
if (error instanceof Error) {
error.message = `integerTypeCastFunction threw an error:\n\n - ${error.message}`;
}
throw error;
}
} else {
Expand Down

0 comments on commit 5e3e540

Please sign in to comment.