From 2af9a6f9d46ed31b6fc6e3a29e695577dcf09f75 Mon Sep 17 00:00:00 2001
From: Andrew Thornton <art27@cantab.net>
Date: Wed, 21 Jul 2021 21:16:16 +0100
Subject: [PATCH] avoid for-in

Signed-off-by: Andrew Thornton <art27@cantab.net>
---
 web_src/js/index.js | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/web_src/js/index.js b/web_src/js/index.js
index a5ab42d65f..fb3c82776d 100644
--- a/web_src/js/index.js
+++ b/web_src/js/index.js
@@ -2971,11 +2971,11 @@ function showDeletePopup() {
 
   const dialog = $(`.delete.modal${filter}`);
   dialog.find('.name').text($this.data('name'));
-  for (const key of Object.keys(dataArray)) {
+  Object.keys(dataArray).forEach((key) => {
     if (key && key.startsWith('data')) {
       dialog.find(`.${key}`).text(dataArray[key]);
     }
-  }
+  });
 
   dialog.modal({
     closable: false,
@@ -2988,14 +2988,14 @@ function showDeletePopup() {
       const postData = {
         _csrf: csrf,
       };
-      for (const key of Object.keys(dataArray)) {
+      Object.keys(dataArray).forEach((key) => {
         if (key && key.startsWith('data')) {
           postData[key.substr(4)] = dataArray[key];
         }
         if (key === 'id') {
           postData['id'] = dataArray['id'];
         }
-      }
+      });
 
       $.post($this.data('url'), postData).done((data) => {
         window.location.href = data.redirect;