Skip to content
This repository has been archived by the owner on Jan 18, 2024. It is now read-only.

Commit

Permalink
chore: Fix typing issues
Browse files Browse the repository at this point in the history
  • Loading branch information
p2kmgcl authored and Pablo Molina committed Apr 19, 2022
1 parent d98c29e commit c684493
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/import/import-legacy.ts
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ async function _importFragment(
const fragmentEntryKey = fragment.slug;
const status = 0;
let previewFileEntryId = INVALID_FILE_ENTRY_ID;
let errorMessage;
let errorMessage = '';

let existingFragment = await _getExistingFragment(
groupId,
Expand All @@ -179,7 +179,7 @@ async function _importFragment(
existingFragment ? existingFragment.previewFileEntryId : '0'
);
} catch (error) {
errorMessage = error.toString();
errorMessage = error instanceof Error ? error.toString() : `${error}`;
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/utils/auth-generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ export default class AuthGenerator extends CustomGenerator {
this.logMessage(
'Connection unsuccessful,\n' +
'please check your host information.\n\n' +
`${error.toString()}\n`,
`${error instanceof Error ? error.toString() : error}\n`,
{ level: 'error' }
);

Expand Down

0 comments on commit c684493

Please sign in to comment.