From 3e94bb966455a4d83681b49e95ef233d1ff39c08 Mon Sep 17 00:00:00 2001 From: Chuck Date: Sun, 3 May 2026 08:27:51 -0400 Subject: [PATCH] fix(js): use Object.prototype.hasOwnProperty.call in day-selector widget Direct .hasOwnProperty() calls on objects can be shadowed if the object itself has a property named hasOwnProperty. Using Object.prototype. hasOwnProperty.call(obj, key) is the safe, ESLint-compliant form. Co-Authored-By: Claude Sonnet 4.6 --- web_interface/static/v3/js/widgets/day-selector.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web_interface/static/v3/js/widgets/day-selector.js b/web_interface/static/v3/js/widgets/day-selector.js index 1280f180..7ce18598 100644 --- a/web_interface/static/v3/js/widgets/day-selector.js +++ b/web_interface/static/v3/js/widgets/day-selector.js @@ -91,7 +91,7 @@ const xOptions = config['x-options'] || config['x_options'] || {}; const requestedFormat = xOptions.format || 'long'; // Validate format exists in DAY_LABELS, default to 'long' if not - const format = DAY_LABELS.hasOwnProperty(requestedFormat) ? requestedFormat : 'long'; + const format = Object.prototype.hasOwnProperty.call(DAY_LABELS, requestedFormat) ? requestedFormat : 'long'; const layout = xOptions.layout || 'horizontal'; const showSelectAll = xOptions.selectAll !== false;