|
@ -22,6 +22,7 @@ tag app-links |
|
|
try |
|
|
try |
|
|
let result = Number(eval_math state.query) |
|
|
let result = Number(eval_math state.query) |
|
|
throw _ if isNaN result |
|
|
throw _ if isNaN result |
|
|
|
|
|
throw _ if result.toString! is state.query.trim! |
|
|
result |
|
|
result |
|
|
catch |
|
|
catch |
|
|
no |
|
|
no |
|
@ -122,8 +123,7 @@ tag app-links |
|
|
disabled=state.loading |
|
|
disabled=state.loading |
|
|
> |
|
|
> |
|
|
|
|
|
|
|
|
let m = math_result |
|
|
if (let m = math_result) isnt no |
|
|
if m isnt no and m.toString! isnt state.query.trim! |
|
|
|
|
|
<.side.right[c:blue3 fs:20px ml:10px w:unset] |
|
|
<.side.right[c:blue3 fs:20px ml:10px w:unset] |
|
|
@click=handle_click_copy(m) |
|
|
@click=handle_click_copy(m) |
|
|
> "= {Math.round(m * 100)/100}" |
|
|
> "= {Math.round(m * 100)/100}" |
|
|