From b609387e497d55c12c2e9a1fb6a1d24604374bf3 Mon Sep 17 00:00:00 2001 From: futpib Date: Wed, 21 Nov 2018 01:06:59 +0300 Subject: [PATCH] Control default sink volume if none other select --- components/graph/index.js | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/components/graph/index.js b/components/graph/index.js index 3fda38b..7872d6a 100644 --- a/components/graph/index.js +++ b/components/graph/index.js @@ -1079,11 +1079,13 @@ class Graph extends React.Component { } _hotKeyVolume(direction) { - if (!this.state.selected) { - return; - } + let pai; - const pai = dgoToPai.get(this.state.selected); + if (this.state.selected) { + pai = dgoToPai.get(this.state.selected); + } else { + pai = getDefaultSinkPai({ pulse: this.props }); + } if (!pai) { return;