From 3cf24e7dcb218310edc17a2bd4b3d12d7ab09fea Mon Sep 17 00:00:00 2001 From: Nimaoth Date: Tue, 9 Jan 2024 22:28:54 +0100 Subject: [PATCH] fixed indentation --- src/app.nim | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/src/app.nim b/src/app.nim index d90bf1ab..cdc15253 100644 --- a/src/app.nim +++ b/src/app.nim @@ -279,21 +279,21 @@ proc invokeCallback*(self: App, context: string, args: JsonNode): bool = proc invokeAnyCallback*(self: App, context: string, args: JsonNode): JsonNode = if self.callbacks.contains(context): - let id = self.callbacks[context] - try: - withScriptContext self, self.scriptContext: - let res = self.scriptContext.handleAnyCallback(id, args) - if res.isNotNil: - return res + let id = self.callbacks[context] + try: + withScriptContext self, self.scriptContext: + let res = self.scriptContext.handleAnyCallback(id, args) + if res.isNotNil: + return res - withScriptContext self, self.wasmScriptContext: - let res = self.wasmScriptContext.handleAnyCallback(id, args) - if res.isNotNil: - return res + withScriptContext self, self.wasmScriptContext: + let res = self.wasmScriptContext.handleAnyCallback(id, args) + if res.isNotNil: + return res return nil - except CatchableError: - log(lvlError, fmt"Failed to run script handleAnyCallback {id}: {getCurrentExceptionMsg()}") - log(lvlError, getCurrentException().getStackTrace()) + except CatchableError: + log(lvlError, fmt"Failed to run script handleAnyCallback {id}: {getCurrentExceptionMsg()}") + log(lvlError, getCurrentException().getStackTrace()) return nil else: