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:
parent
08cf749277
commit
324e834083
|
@ -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 () {
|
||||||
|
|
Loading…
Reference in New Issue