@eturnity/eturnity_reusable_components 7.12.6-EPDM-7951.6 → 7.12.6-EPDM-7951.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@eturnity/eturnity_reusable_components",
3
- "version": "7.12.6-EPDM-7951.6",
3
+ "version": "7.12.6-EPDM-7951.8",
4
4
  "private": false,
5
5
  "scripts": {
6
6
  "dev": "vue-cli-service serve",
@@ -102,17 +102,17 @@ const IconImage = styled.div`
102
102
 
103
103
  const icon = reactive({ html: '' })
104
104
 
105
- const loadSvg = async (fileName = props.name) => {
106
- const _fileName = fileName.toLowerCase()
105
+ const loadSvg = async () => {
106
+ const fileName = props.name.toLowerCase()
107
107
  // We need to use "new URL" to load dynamic assets (https://vitejs.dev/guide/assets.html#new-url-url-import-meta-url)
108
108
  const fetchUrl = new URL(
109
- `../../assets/svgIcons/${_fileName}.svg`,
109
+ `../../assets/svgIcons/${fileName}.svg`,
110
110
  import.meta.url
111
111
  ).href
112
112
  try {
113
- const fetchResponse = await fetch(fetchUrl)
114
- icon.html = await fetchResponse.text()
115
- } catch (error) {
113
+ const response = await fetch(fetchUrl)
114
+ icon.html = await response.text()
115
+ } catch (_) {
116
116
  console.error(`Failed to load ${props.name}.svg`)
117
117
  }
118
118
  }