From 9573c3b8ffa272d18a717906869dedd92de1f086 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Kucharczyk?= Date: Wed, 29 Nov 2023 22:26:43 +0100 Subject: [PATCH] Better formatting --- games/static/js/utils.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/games/static/js/utils.js b/games/static/js/utils.js index 5fc119f..df49497 100644 --- a/games/static/js/utils.js +++ b/games/static/js/utils.js @@ -75,6 +75,10 @@ function syncSelectInputUntilChanged(syncData, parentSelector = document) { * @param {string} property - The property to retrieve the value from. */ function getValueFromProperty(sourceElement, property) { + let source = + sourceElement instanceof HTMLSelectElement + ? sourceElement.selectedOptions[0] + : sourceElement; let source = sourceElement instanceof HTMLSelectElement ? sourceElement.selectedOptions[0]