diff options
Diffstat (limited to 'desktop/island/Logic.js')
| -rw-r--r-- | desktop/island/Logic.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/desktop/island/Logic.js b/desktop/island/Logic.js index 8df35de..e79625c 100644 --- a/desktop/island/Logic.js +++ b/desktop/island/Logic.js @@ -13,7 +13,9 @@ // The default sink's icon name. Thresholds in thirds, as waybar's wb-icon did. function volumeIcon(volume, muted) { - if (muted || volume <= 0) return "audio-volume-muted"; + // !(> 0) also catches a volume not populated yet (undefined, NaN), which + // would otherwise fall through every test and read as high. + if (muted || !(volume > 0)) return "audio-volume-muted"; if (volume < 0.33) return "audio-volume-low"; if (volume < 0.66) return "audio-volume-medium"; return "audio-volume-high"; |
