fix: bugs catched by linter

This commit is contained in:
Felix Roos 2024-03-16 02:16:50 +01:00
parent f4032dad22
commit ef284e9d13
2 changed files with 3 additions and 3 deletions

View file

@ -236,7 +236,7 @@ export function getAnalyserById(id, fftSize = 1024) {
export function getAnalyzerData(type = 'time', id = 1) {
const getter = {
time: () => analysers[id]?.getFloatTimeDomainData(analysersData[id]),
frequency: () => analyser[id]?.getFloatFrequencyData(analysersData[id]),
frequency: () => analysers[id]?.getFloatFrequencyData(analysersData[id]),
}[type];
if (!getter) {
throw new Error(`getAnalyzerData: ${type} not supported. use one of ${Object.keys(getter).join(', ')}`);