[fix] metrica working diffrently

This commit is contained in:
kwaroran
2023-12-06 04:09:55 +09:00
parent 7fc107517b
commit dd730df940

View File

@@ -16,7 +16,7 @@ export function metricaPlugin(data:string, toSystem:'metrics'|'imperial'){
const c = convertion.sort((a,b) => b[0].length - a[0].length);
for(let i = 0; i < c.length; i++){
let [from, to, ratio] = c[i];
if(toSystem === 'imperial'){
if(toSystem !== 'imperial'){
[from, to] = [to, from];
ratio = 1 / ratio;
}