2
0

💄 Fix audio element UI overflow on Firefox

Also added better display when a media bubble src is a variable

Closes #1742
This commit is contained in:
Baptiste Arnaud
2024-09-02 11:47:02 +02:00
parent 041b817aa0
commit d51cf00f69
8 changed files with 60 additions and 36 deletions

View File

@@ -1,12 +1,12 @@
import { Variable } from './types'
export const findUniqueVariableValue =
export const findUniqueVariable =
(variables: Variable[]) =>
(value: string | undefined): Variable['value'] => {
(value: string | undefined): Variable | null => {
if (!value || !value.startsWith('{{') || !value.endsWith('}}')) return null
const variableName = value.slice(2, -2)
const variable = variables.find(
(variable) => variable.name === variableName
)
return variable?.value ?? null
return variable ?? null
}