Enable no-unsafe-negation lint
This actually fixes a bug--the old code was negating "audioData.type"
This commit is contained in:
parent
7def71aef7
commit
c05aee8e72
|
@ -65,7 +65,6 @@ module.exports = {
|
|||
'no-case-declarations': 'off',
|
||||
'use-isnan': 'off',
|
||||
'no-self-assign': 'off',
|
||||
'no-unsafe-negation': 'off',
|
||||
'no-constant-condition': ['error', {checkLoops: false}]
|
||||
}
|
||||
};
|
||||
|
|
|
@ -425,7 +425,7 @@ function completeCurrentAudioJob() {
|
|||
*/
|
||||
async function addAudioJob(response) {
|
||||
const audioData = await response.blob()
|
||||
if (!audioData.type in ['audio/mpeg', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/webm']) {
|
||||
if (!(audioData.type in ['audio/mpeg', 'audio/wav', 'audio/x-wav', 'audio/wave', 'audio/webm'])) {
|
||||
throw `TTS received HTTP response with invalid data format. Expecting audio/mpeg, got ${audioData.type}`
|
||||
}
|
||||
audioJobQueue.push(audioData)
|
||||
|
|
Loading…
Reference in New Issue