Skip to content

Commit

Permalink
fix: avoid text content being stored as image
Browse files Browse the repository at this point in the history
Refs: #119
  • Loading branch information
kunfang98927 committed Jul 12, 2024
1 parent 2d2001a commit 926d5a4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Editor/ImageTools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,11 @@ export class ImageTools {
// Image Handler Functions
storeImages(inputImgHeader: string, body: any[]) {
body.forEach((row, rowIndex) => {
const base64Image = row[inputImgHeader];
if (base64Image) {
this.getImageDimensions(base64Image).then(([width, height]) => {
const value = row[inputImgHeader];
if (value && (value.includes('http') || value.includes('base64'))) {
this.getImageDimensions(value).then(([width, height]) => {
this.images.push({
image: base64Image,
image: value,
width,
height,
row: rowIndex,
Expand Down

0 comments on commit 926d5a4

Please sign in to comment.