summaryrefslogtreecommitdiff
path: root/client/simple
diff options
context:
space:
mode:
authorJayant Sharma <jayant.sharma2023@vitstudent.ac.in>2026-06-18 21:06:47 +0530
committerGitHub <noreply@github.com>2026-06-18 17:36:47 +0200
commitb5ef7ec8f32b7020cc0f887e26f0d01b85949d17 (patch)
treeb9255530463559690945d8f68e5bdedaabde05ef /client/simple
parentbd73cc09eaecdbad22da580ecc4019ed668a1206 (diff)
[fix] calculator: move math.parse inside try-catch (#6278) (#6280)
* [fix] calculator: move math.parse inside try-catch (#6278) * build static --------- Co-authored-by: Ivan Gabaldon <igabaldon@inetol.net>
Diffstat (limited to 'client/simple')
-rw-r--r--client/simple/src/js/plugin/Calculator.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/simple/src/js/plugin/Calculator.ts b/client/simple/src/js/plugin/Calculator.ts
index 95196a840..318dd8ec8 100644
--- a/client/simple/src/js/plugin/Calculator.ts
+++ b/client/simple/src/js/plugin/Calculator.ts
@@ -77,9 +77,9 @@ export default class Calculator extends Plugin {
protected async run(): Promise<string | undefined> {
const searchInput = getElement<HTMLInputElement>("q");
- const node = Calculator.math.parse(searchInput.value);
try {
+ const node = Calculator.math.parse(searchInput.value);
return `${node.toString()} = ${node.evaluate()}`;
} catch {
// not a compatible math expression