diff --git a/pkg/lib/cockpit.js b/pkg/lib/cockpit.js index 83d131f01df8..b334c615f842 100644 --- a/pkg/lib/cockpit.js +++ b/pkg/lib/cockpit.js @@ -116,12 +116,6 @@ function factory() { }, }; - cockpit.when = function when(value, fulfilled, rejected, updated) { - const result = cockpit.defer(); - result.resolve(value); - return result.promise.then(fulfilled, rejected, updated); - }; - cockpit.defer = function() { return new Deferred(); }; diff --git a/pkg/shell/machines/machines.js b/pkg/shell/machines/machines.js index a3d78c7b9fd6..272fc9b2e825 100644 --- a/pkg/shell/machines/machines.js +++ b/pkg/shell/machines/machines.js @@ -205,7 +205,7 @@ function Machines() { const data = { ...machine, ...values }; window.sessionStorage.setItem(skey, JSON.stringify(data)); self.overlay(host, values); - return cockpit.when([]); + return Promise.resolve([]); } function update_saved_machine(host, values) {