From ebacb562da85fa0fb3babfbe6a9a050d85d6c6f2 Mon Sep 17 00:00:00 2001 From: Martin Pitt Date: Mon, 25 Nov 2024 13:09:53 +0100 Subject: [PATCH] fix: Drop deprecated cockpit.resolve() cockpit.{resolve,reject} have been deprecated for years. Use the standard JS promise API. --- src/insights.jsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/insights.jsx b/src/insights.jsx index b851237..d49f87e 100644 --- a/src/insights.jsx +++ b/src/insights.jsx @@ -120,7 +120,7 @@ export function unregister() { return cockpit.spawn([ "insights-client", "--unregister" ], { superuser: true, err: "out" }) .catch(catch_error); } else { - return cockpit.resolve(); + return Promise.resolve(); } }