refactor: compare with undefined directly (#9191)

* refactor: compare with `undefined` directly

* fix: lint
This commit is contained in:
Almeida
2023-03-12 20:24:22 +00:00
committed by GitHub
parent 955e8fe312
commit 869153c3fd
29 changed files with 69 additions and 77 deletions

View File

@@ -258,7 +258,7 @@ export function createAudioResource<T>(
// string inputs can only be used with FFmpeg
if (typeof input === 'string') {
inputType = StreamType.Arbitrary;
} else if (typeof inputType === 'undefined') {
} else if (inputType === undefined) {
const analysis = inferStreamType(input);
inputType = analysis.streamType;
needsInlineVolume = needsInlineVolume && !analysis.hasVolume;