@playpilot/tpi 8.29.0-beta.2 → 8.29.0-beta.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": "@playpilot/tpi",
3
- "version": "8.29.0-beta.2",
3
+ "version": "8.29.0-beta.4",
4
4
  "type": "module",
5
5
  "scripts": {
6
6
  "dev": "vite dev",
@@ -218,15 +218,19 @@ function createLinkInjectionElement(injection: LinkInjection): { injectionElemen
218
218
 
219
219
  const openInExplore = !!window.PlayPilotLinkInjections?.config?.open_tpi_links_in_explore
220
220
 
221
- const href = openInExplore ? exploreTitleUrl(injection.title_details!) : titleUrl(injection.title_details!)
221
+ const href =
222
+ injection.type === 'title' ?
223
+ openInExplore ? exploreTitleUrl(injection.title_details!) : titleUrl(injection.title_details!) :
224
+ '' // FIXME: We don't have participant streaming guide pages yet
222
225
 
223
226
  const linkElement = document.createElement('a')
224
- linkElement.dataset.playpilotPosterUrl = injection.title_details?.standing_poster
225
227
  linkElement.innerText = injection.title
226
228
  linkElement.href = href
227
229
  linkElement.target = openInExplore ? '' : '_blank'
228
230
  linkElement.rel = 'noopener nofollow noreferrer'
229
231
 
232
+ if (injection.type === 'title') linkElement.dataset.playpilotPosterUrl = injection.title_details?.standing_poster
233
+
230
234
  injectionElement.insertAdjacentElement('beforeend', linkElement)
231
235
 
232
236
  return { injectionElement, linkElement }