From 03a15353c686100f837c7b376800e4adaed28dc8 Mon Sep 17 00:00:00 2001 From: Felix Fietkau Date: Wed, 26 Feb 2025 10:35:02 +0100 Subject: [PATCH] cli: use model scope for hook calls Make the scope consistent with other callbacks Signed-off-by: Felix Fietkau --- package/utils/cli/files/usr/share/ucode/cli/datamodel.uc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/utils/cli/files/usr/share/ucode/cli/datamodel.uc b/package/utils/cli/files/usr/share/ucode/cli/datamodel.uc index bc78a7b12b..f6d9454dd7 100644 --- a/package/utils/cli/files/usr/share/ucode/cli/datamodel.uc +++ b/package/utils/cli/files/usr/share/ucode/cli/datamodel.uc @@ -122,7 +122,7 @@ function run_hook(name, ...args) return; for (let hook in hooks) - call(hook, this, {}, ...args); + call(hook, this, this.scope, ...args); } function init() -- 2.30.2