Skip to content

Commit

Permalink
fix: don't reject without an error
Browse files Browse the repository at this point in the history
  • Loading branch information
nytamin committed Jan 29, 2024
1 parent 5126c34 commit c8d9d31
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/hyperdeck.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ export class Hyperdeck extends EventEmitter<HyperdeckEvents> {
}

async sendCommand<TResponse>(command: AbstractCommand<TResponse>): Promise<TResponse> {
if (!this._connected) return Promise.reject()
if (!this._connected) return Promise.reject(new Error('Hyperdeck not connected'))

const res = this._queueCommand(command)
this._logDebug('queued:', this._commandQueue.length)
Expand Down

0 comments on commit c8d9d31

Please sign in to comment.