@luceosports/play-rendering 2.4.2 → 2.4.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@luceosports/play-rendering",
3
- "version": "2.4.2",
3
+ "version": "2.4.4",
4
4
  "main": "dist/play-rendering.js",
5
5
  "types": "dist/play-rendering.d.ts",
6
6
  "scripts": {
Binary file
@@ -147,11 +147,11 @@ export default class PlayerLayer extends BaseLayer {
147
147
  }
148
148
 
149
149
  let playerTextLabel = player.textLabel;
150
- if (playerMapItem && this.options.labelsOverrideType) {
150
+ if (playerMapItem) {
151
151
  if (playerMapItem.textOverride) {
152
152
  playerTextLabel = playerMapItem.textOverride;
153
153
  }
154
- if (playerMapItem.teamPlayerId) {
154
+ if (playerMapItem.teamPlayerId && this.options.labelsOverrideType) {
155
155
  const teamPlayer = this.staticData.teamPlayers.find(p => p.id === playerMapItem.teamPlayerId);
156
156
  if (teamPlayer) {
157
157
  const fallbackLabel = teamPlayer.User_Name.split(' ')
@@ -22,7 +22,6 @@ import grassImageData from '../assets/grass_bg.png';
22
22
  import iceImageData from '../assets/ice_bg.png';
23
23
  import concreteImageData from '../assets/concrete_bg.png';
24
24
  import { loadImage } from '../helpers/common';
25
- import { im } from 'mathjs';
26
25
 
27
26
  const STORAGE_URL = 'https://playbooksstore.blob.core.windows.net/public';
28
27
  const LUCEOSPORTS_WATERMARK_PATH = 'partners/LuceoSports/luceo-sports-logo-powered-by-sm.png';
@@ -3,5 +3,5 @@ import PlayModel from './models/PlayModel';
3
3
  export function isBackgroundOption(
4
4
  arg: keyof typeof PlayModel.backgroundOptions | string
5
5
  ): arg is keyof typeof PlayModel.backgroundOptions {
6
- return (PlayModel.backgroundOptions as Record<string, any>)[arg] !== undefined;
6
+ return ((PlayModel.backgroundOptions || {}) as Record<string, any>)[arg] !== undefined;
7
7
  }