diff --git a/package.json b/package.json index 3958986f..2fea4816 100755 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "frankerfacez", "author": "Dan Salvato LLC", - "version": "4.62.1", + "version": "4.62.2", "description": "FrankerFaceZ is a Twitch enhancement suite.", "private": true, "license": "Apache-2.0", diff --git a/src/sites/twitch-twilight/modules/chat/index.js b/src/sites/twitch-twilight/modules/chat/index.js index 06fdb836..707f9ebc 100644 --- a/src/sites/twitch-twilight/modules/chat/index.js +++ b/src/sites/twitch-twilight/modules/chat/index.js @@ -3376,4 +3376,4 @@ export function formatBitsConfig(config) { } return out; -} \ No newline at end of file +} diff --git a/src/utilities/color.ts b/src/utilities/color.ts index 4f5490e1..55d29f61 100644 --- a/src/utilities/color.ts +++ b/src/utilities/color.ts @@ -244,7 +244,7 @@ class RGBAColor implements BaseColor { } toHex() { - const value = (this.r << 16) + (this.g << 8) + this.b; + const value = (Math.round(this.r) << 16) + (Math.round(this.g) << 8) + Math.round(this.b); return `#${value.toString(16).padStart(6, '0')}`; } @@ -823,19 +823,19 @@ export class ColorAdjuster { if ( this._mode === -1 ) return ''; - else if ( this._mode === 0 ) - return color; - if ( typeof color !== 'string' ) color = color.toCSS(); + if ( this._mode === 0 ) + return color; + if ( ! color ) return null; if ( this._cache.has(color) ) return this._cache.get(color); - let rgb; + let rgb: RGBAColor; try { rgb = RGBAColor.fromCSS(color); diff --git a/src/utilities/compat/subpump.ts b/src/utilities/compat/subpump.ts index d5413fb0..b22c111f 100644 --- a/src/utilities/compat/subpump.ts +++ b/src/utilities/compat/subpump.ts @@ -79,12 +79,12 @@ export class PubSubEvent extends FFZEvent { _changed: boolean; // This is assigned in super() - prefix: string = null as any; - trail: string = null as any; + prefix: string; + trail: string; event: { topic: string; message: string; - } = null as any; + }; constructor(data: RawPubSubEventData) { super(data); diff --git a/src/utilities/dom.ts b/src/utilities/dom.ts index 510f1231..d60faff7 100644 --- a/src/utilities/dom.ts +++ b/src/utilities/dom.ts @@ -454,7 +454,7 @@ export class ClickOutside { this.cb = callback; this._fn = this.handleClick.bind(this); - document.documentElement.addEventListener('click', this.handleClick); + document.documentElement.addEventListener('click', this._fn); } destroy() {