fix: Fix unhandled errors

environments/review-docs-fix-b-0p3p4g/deployments/16281
wvffle 2022-12-12 11:10:31 +00:00
rodzic 18b3a6dcb2
commit 6e740d6fda
5 zmienionych plików z 8 dodań i 7 usunięć

Wyświetl plik

@ -31,7 +31,7 @@ const equalizerFilters = [
let lastNode: IAudioNode<IAudioContext> | null = null
export const connectAudioSource = (sourceNode: IAudioNode<IAudioContext>) => {
for (const filter of equalizerFilters) {
if (lastNode !== null) filter.disconnect(lastNode)
lastNode?.disconnect(filter)
sourceNode.connect(filter)
}

Wyświetl plik

@ -165,6 +165,7 @@ export const useTracks = createGlobalState(() => {
whenever(track, () => {
createTrack(currentIndex.value)
}, { immediate: true })
syncRef(track, currentTrack, {
direction: 'ltr'
})

Wyświetl plik

@ -3,7 +3,7 @@ import type { ContentFilter } from '~/store/moderation'
import { useCurrentElement } from '@vueuse/core'
import { computed, markRaw, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import { i18n } from '~/init/locale'
import { useStore } from '~/store'
import { usePlayer } from '~/composables/audio/player'
@ -54,7 +54,7 @@ export default (props: PlayOptionsProps) => {
return
}
const { t } = useI18n()
const { t } = i18n.global
store.commit('ui/addMessage', {
content: t('composables.audio.usePlayOptions.addToQueueMessage', tracks.length),
date: new Date()

Wyświetl plik

@ -1,6 +1,6 @@
import type { Album, Artist, Content, Track, Actor } from '~/types'
import { useI18n } from 'vue-i18n'
import { i18n } from '~/init/locale'
export interface ConfigField {
id: string
@ -24,7 +24,7 @@ const getContentValueRepr = (val: Content) => val.text
// TODO: Get params from typescript type somehow?
export default (): Configs => {
const { t } = useI18n()
const { t } = i18n.global
const description: ConfigField = {
id: 'description',

Wyświetl plik

@ -1,7 +1,7 @@
import type { EntityObjectType } from '~/types'
import type { RouteLocationRaw } from 'vue-router'
import { useI18n } from 'vue-i18n'
import { i18n } from '~/init/locale'
interface ModeratedField {
id: string
@ -23,7 +23,7 @@ export interface Entity {
type Configs = Record<EntityObjectType, Entity>
export default (): Configs => {
const { t } = useI18n()
const { t } = i18n.global
const tags: ModeratedField = {
id: 'tags',