Settings: Round `defaultVolume`'s getter value to the nearest integer

This fixes a bug related to the presentation of the `defaultVolume`
value in its respective label in the Settings view.

Since the value stored in the database and in the in-memory store
is a decimal number, it is subject to floating point arithmetic related
limitations.

Example (processed by the V8 engine):
0.28 * 100 = 28.000000000000004
This commit is contained in:
Svallinn 2021-06-09 00:59:53 +01:00
parent 08cf749277
commit 324e834083
No known key found for this signature in database
GPG Key ID: 09FB527F34037CCA
1 changed files with 1 additions and 1 deletions

View File

@ -67,7 +67,7 @@ export default Vue.extend({
}, },
defaultVolume: function () { defaultVolume: function () {
return parseFloat(this.$store.getters.getDefaultVolume) * 100 return Math.round(parseFloat(this.$store.getters.getDefaultVolume) * 100)
}, },
defaultPlayback: function () { defaultPlayback: function () {