Skip to content

Commit

Permalink
🐛 fix: 修复未设置水印文本,显示 undefined
Browse files Browse the repository at this point in the history
  • Loading branch information
wangxingkang committed Jan 17, 2022
1 parent 1bd8fee commit cf95b6e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/core/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ export function getDrawPattern(config: WatermarkOptions): Promise<DrawPatternRes
initY = initY < 0 ? 0 : initY;

for (let i = 0; i < texts.length; i ++) {
ctx.fillText(texts[i], markWidth / 2, initY + (lineHeight * i));
ctx.fillText(texts[i] || '', markWidth / 2, initY + (lineHeight * i));
}

resolve({
Expand Down

1 comment on commit cf95b6e

@vercel
Copy link

@vercel vercel bot commented on cf95b6e Jan 17, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.