From f5565e74c2a5995cfc3fc337f729489d77f34a4d Mon Sep 17 00:00:00 2001 From: Jordan Eldredge Date: Mon, 28 Jun 2021 20:31:49 -0700 Subject: [PATCH] Handle case where bitmap does not have an x/y --- packages/webamp-modern-2/src/skin/Bitmap.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/webamp-modern-2/src/skin/Bitmap.ts b/packages/webamp-modern-2/src/skin/Bitmap.ts index 68130808..3126b74d 100644 --- a/packages/webamp-modern-2/src/skin/Bitmap.ts +++ b/packages/webamp-modern-2/src/skin/Bitmap.ts @@ -89,8 +89,8 @@ export default class Bitmap { } getBackgrondPositionCSSAttribute(): string { - const x = Utils.px(-this._x); - const y = Utils.px(-this._y); + const x = Utils.px(-(this._x ?? 0)); + const y = Utils.px(-(this._y ?? 0)); return `${x} ${y}`; }