presets: fail() should return undefined

This commit is contained in:
Micooz 2018-06-24 13:31:41 +08:00
parent d76f13b465
commit 33cbd02976

@ -23,7 +23,7 @@ export class IPreset extends EventEmitter {
const postfix = (type === PIPE_ENCODE ? 'Out' : 'In') + (isUdp ? 'Udp' : '');
// prepare args
const fail = (message) => this.emit('fail', this.name, message);
const fail = (message) => void this.emit('fail', this.name, message);
const next = (processed, isReverse = false) => {
// oh my nice hack to deal with reverse pipeline if haven't been created
const hasListener = this.emit(`next_${isReverse ? -type : type}`, processed);