@veritree/ui 0.58.1 → 0.58.2

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": "@veritree/ui",
3
- "version": "0.58.1",
3
+ "version": "0.58.2",
4
4
  "description": "veritree ui library",
5
5
  "type": "module",
6
6
  "main": "index.js",
@@ -60,12 +60,14 @@ export default {
60
60
  return this.placeholder;
61
61
  }
62
62
 
63
- if (this.cdnSrc) {
64
- return this.handleImageResizing(this.cdnSrc, this.$attrs.width);
63
+ if (this.src) {
64
+ return this.src.includes('cloudfront.net/')
65
+ ? handleImageResizing(this.src, this.$attrs.width)
66
+ : this.src;
65
67
  }
66
68
 
67
- if (this.src) {
68
- return this.src;
69
+ if (this.cdnSrc) {
70
+ return handleImageResizing(this.cdnSrc, this.$attrs.width);
69
71
  }
70
72
  }
71
73
 
@@ -88,8 +90,6 @@ export default {
88
90
  },
89
91
 
90
92
  methods: {
91
- handleImageResizing,
92
-
93
93
  onLoad() {
94
94
  this.isLoaded = true;
95
95
  },
@@ -8,7 +8,7 @@ export const handleImageResizing = (url, width) => {
8
8
 
9
9
  try {
10
10
  // new code
11
- if( url === 'string' && url.includes('cloudfront.net/')) {
11
+ if(typeof url === 'string' && url.includes('cloudfront.net/')) {
12
12
  cdn = url;
13
13
  } else {
14
14
  // old code