@veritree/ui 0.16.4 → 0.16.7
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,4 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
+
<!-- :href="href" -->
|
|
2
3
|
<component
|
|
3
4
|
:is="tag"
|
|
4
5
|
:to="to"
|
|
@@ -115,7 +116,7 @@ export default {
|
|
|
115
116
|
},
|
|
116
117
|
|
|
117
118
|
tag() {
|
|
118
|
-
return this.to ? 'NuxtLink' : 'button';
|
|
119
|
+
return this.$attrs.href ? 'a' : this.to ? 'NuxtLink' : 'button';
|
|
119
120
|
},
|
|
120
121
|
|
|
121
122
|
type() {
|
package/src/utils/images.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
export const handleImageResizing = (url, width) => {
|
|
2
|
+
// early exit if url is null for whatever reason
|
|
3
|
+
if (!url) {
|
|
4
|
+
return '';
|
|
5
|
+
}
|
|
6
|
+
|
|
7
|
+
let cdn;
|
|
8
|
+
|
|
2
9
|
try {
|
|
3
|
-
// early exit if url is null for whatever reason
|
|
4
|
-
if (!url) {
|
|
5
|
-
return '';
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
let cdn;
|
|
9
|
-
|
|
10
10
|
if (typeof url === 'object') {
|
|
11
11
|
cdn = url.cdn_url;
|
|
12
12
|
}
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
if (typeof url === 'string') {
|
|
15
15
|
cdn = JSON.parse(url).cdn_url;
|
|
16
16
|
}
|
|
@@ -39,7 +39,6 @@ export const handleImageResizing = (url, width) => {
|
|
|
39
39
|
|
|
40
40
|
return encodedUrl
|
|
41
41
|
} catch(error) {
|
|
42
|
-
console.
|
|
43
|
-
console.log(error);
|
|
42
|
+
console.error(`${error} in ${cdn}`);
|
|
44
43
|
}
|
|
45
44
|
};
|