@xcpcio/core 0.17.0 → 0.18.0

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/dist/index.cjs CHANGED
@@ -832,7 +832,7 @@ function getImageSource(image) {
832
832
  return image.url;
833
833
  }
834
834
  if (image?.base64) {
835
- return `data:image/${image.type};base64,${image.base64}`;
835
+ return `data:image/${image.type ?? "png"};base64,${image.base64}`;
836
836
  }
837
837
  return "";
838
838
  }
package/dist/index.mjs CHANGED
@@ -802,7 +802,7 @@ function getImageSource(image) {
802
802
  return image.url;
803
803
  }
804
804
  if (image?.base64) {
805
- return `data:image/${image.type};base64,${image.base64}`;
805
+ return `data:image/${image.type ?? "png"};base64,${image.base64}`;
806
806
  }
807
807
  return "";
808
808
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@xcpcio/core",
3
- "version": "0.17.0",
3
+ "version": "0.18.0",
4
4
  "description": "XCPCIO Core",
5
5
  "author": "Dup4 <lyuzhi.pan@gmail.com>",
6
6
  "license": "MIT",
@@ -44,7 +44,7 @@
44
44
  "lodash": "^4.17.21",
45
45
  "string-width": "^6.1.0",
46
46
  "xlsx-js-style": "^1.2.0",
47
- "@xcpcio/types": "0.17.0"
47
+ "@xcpcio/types": "0.18.0"
48
48
  },
49
49
  "devDependencies": {
50
50
  "@babel/types": "^7.22.4",
package/src/image.ts CHANGED
@@ -6,7 +6,7 @@ export function getImageSource(image: Image): string {
6
6
  }
7
7
 
8
8
  if (image?.base64) {
9
- return `data:image/${image.type};base64,${image.base64}`;
9
+ return `data:image/${image.type ?? "png"};base64,${image.base64}`;
10
10
  }
11
11
 
12
12
  return "";