diff --git a/src/engine/operations/helpers.ts b/src/engine/operations/helpers.ts index c4fdad1..ae820b4 100644 --- a/src/engine/operations/helpers.ts +++ b/src/engine/operations/helpers.ts @@ -1,6 +1,6 @@ // Helper functions for evaluator operations -import type { Quantity, Unit } from "../types"; -import { Decimal, EvalError } from "../types"; +import type { Quantity, Unit , Decimal} from "../types"; +import { EvalError } from "../types"; /** * Converts quantity to base dimension units diff --git a/src/ui/editor.ts b/src/ui/editor.ts index 61111d0..618e366 100644 --- a/src/ui/editor.ts +++ b/src/ui/editor.ts @@ -257,8 +257,8 @@ export class SumEditor { }); this.resultsEl.addEventListener("click", (e) => { - const el = (e.target as HTMLElement).closest(".result-line") as HTMLElement | null; - if (el?.dataset.value) {this.cb.onCopy(el.dataset.value as string);} + const el = (e.target as HTMLElement).closest(".result-line"); + if (el?.dataset.value) {this.cb.onCopy(el.dataset.value);} }); }