[fix] metrica working diffrently
This commit is contained in:
@@ -16,7 +16,7 @@ export function metricaPlugin(data:string, toSystem:'metrics'|'imperial'){
|
|||||||
const c = convertion.sort((a,b) => b[0].length - a[0].length);
|
const c = convertion.sort((a,b) => b[0].length - a[0].length);
|
||||||
for(let i = 0; i < c.length; i++){
|
for(let i = 0; i < c.length; i++){
|
||||||
let [from, to, ratio] = c[i];
|
let [from, to, ratio] = c[i];
|
||||||
if(toSystem === 'imperial'){
|
if(toSystem !== 'imperial'){
|
||||||
[from, to] = [to, from];
|
[from, to] = [to, from];
|
||||||
ratio = 1 / ratio;
|
ratio = 1 / ratio;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user