diff --git a/package.json b/package.json index d6f1dc9d..fe865046 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "xiao", - "version": "114.8.1", + "version": "114.8.2", "description": "Your personal server companion.", "main": "Xiao.js", "scripts": { diff --git a/util/Canvas.js b/util/Canvas.js index b59cef68..f561f310 100644 --- a/util/Canvas.js +++ b/util/Canvas.js @@ -106,7 +106,7 @@ module.exports = class CanvasUtil { static shortenText(ctx, text, maxWidth) { let shorten = false; - while (ctx.measureText(text).width > maxWidth) { + while (ctx.measureText(`${text}...`).width > maxWidth) { if (!shorten) shorten = true; text = text.substr(0, text.length - 1); }