Skip to content

Commit

Permalink
fix(Temperature Converter): don't round to 2 digits
Browse files Browse the repository at this point in the history
Fix #1486
  • Loading branch information
sharevb committed Feb 5, 2025
1 parent 08d977b commit e2fcb40
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions components.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -138,6 +138,9 @@ declare module '@vue/runtime-core' {
NH1: typeof import('naive-ui')['NH1']
NH3: typeof import('naive-ui')['NH3']
NIcon: typeof import('naive-ui')['NIcon']
NInputGroup: typeof import('naive-ui')['NInputGroup']
NInputGroupLabel: typeof import('naive-ui')['NInputGroupLabel']
NInputNumber: typeof import('naive-ui')['NInputNumber']
NLayout: typeof import('naive-ui')['NLayout']
NLayoutSider: typeof import('naive-ui')['NLayoutSider']
NMenu: typeof import('naive-ui')['NMenu']
Expand Down
2 changes: 1 addition & 1 deletion src/tools/temperature-converter/temperature-converter.vue
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ function update(key: TemperatureScale) {
_.chain(units)
.omit(key)
.forEach(({ fromKelvin }, index) => {
units[index].ref = Math.floor((fromKelvin(kelvins) ?? 0) * 100) / 100;
units[index].ref = fromKelvin(kelvins) ?? 0;
})
.value();
}
Expand Down

0 comments on commit e2fcb40

Please sign in to comment.