From 68460ff9347cfe8437ec860cc2e694f16fe082c6 Mon Sep 17 00:00:00 2001 From: Jelle van der Waa Date: Mon, 8 Apr 2024 17:15:08 +0200 Subject: [PATCH] systemd: remove useless spread and list Array.prototype.push supports giving it multiple arguments so making it a list of and de-structuring is unrequired. --- pkg/systemd/logsHelpers.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/systemd/logsHelpers.js b/pkg/systemd/logsHelpers.js index 2973534a8d40..6bdcd59fd8af 100644 --- a/pkg/systemd/logsHelpers.js +++ b/pkg/systemd/logsHelpers.js @@ -55,14 +55,14 @@ export const getGrepFiltersFromOptions = ({ options }) => { options.service.split(",").forEach(s => { if (!s.endsWith(".service")) s = s + ".service"; - match.push(...['_SYSTEMD_UNIT=' + s, "+", "COREDUMP_UNIT=" + s, "+", "UNIT=" + s]); + match.push('_SYSTEMD_UNIT=' + s, "+", "COREDUMP_UNIT=" + s, "+", "UNIT=" + s); }); full_grep += "service:" + options.service + " "; } else if (options["user-service"]) { options["user-service"].split(",").forEach(s => { if (!s.endsWith(".service")) s = s + ".service"; - match.push(...['_SYSTEMD_USER_UNIT=' + s, "+", "COREDUMP_USER_UNIT=" + s, "+", "USER_UNIT=" + s]); + match.push('_SYSTEMD_USER_UNIT=' + s, "+", "COREDUMP_USER_UNIT=" + s, "+", "USER_UNIT=" + s); }); full_grep += "user-service:" + options["user-service"] + " "; }