From 75aed6af9299f91f33e3a86707ede3db5153d1ed Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Mon, 15 Jul 2024 22:26:42 +0200 Subject: [PATCH] [UI] Added asynchronous `timeout` utility. --- platypush/backend/http/webapp/src/utils/Api.vue | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/platypush/backend/http/webapp/src/utils/Api.vue b/platypush/backend/http/webapp/src/utils/Api.vue index 12305fcee7..52ab708855 100644 --- a/platypush/backend/http/webapp/src/utils/Api.vue +++ b/platypush/backend/http/webapp/src/utils/Api.vue @@ -72,7 +72,11 @@ export default { action: action, args: args, }, timeout, showError); - } + }, + + timeout(ms) { + return new Promise(resolve => setTimeout(resolve, ms)); + }, }, }