Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show error message when file can not be loaded #58

Merged
merged 1 commit into from Aug 18, 2022
Merged

Show error message when file can not be loaded #58

merged 1 commit into from Aug 18, 2022

Conversation

abdul-alhasany
Copy link
Contributor

@abdul-alhasany abdul-alhasany commented Jun 23, 2022

Fixes #57

Copy link
Owner

@jpkleemans jpkleemans left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi, thanks for your PR. Good idea!
Can you run the linter npm run lint?

@@ -29,6 +29,7 @@ module.exports = function svgLoader (options = {}) {
try {
svg = await fs.readFile(path, 'utf-8')
} catch (ex) {
console.log("File couldn't be loaded, fallback to default loader", id, ex)
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe use console.warn instead of console.log?

@jpkleemans jpkleemans merged commit e528e6f into jpkleemans:main Aug 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

SVG is loading is not loading as a component
2 participants