From 3389bf37d938316df4bfffad0fa3da61fe1a7d1c Mon Sep 17 00:00:00 2001 From: Mats Mikkel Rummelhoff Date: Fri, 31 Jul 2020 11:01:45 +0200 Subject: [PATCH] Avoid duplicate IDs if we are on the native clear caches utility page --- src/resources/cpclearcache.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/resources/cpclearcache.js b/src/resources/cpclearcache.js index 0aa8bfe..7977b1f 100644 --- a/src/resources/cpclearcache.js +++ b/src/resources/cpclearcache.js @@ -27,7 +27,7 @@ $('.info', $html).infoicon(); $html.find('form').each(function (index) { - this.id = this.id || 'mmikkel-cpclearcache-form-' + index; + this.id = 'mmikkel-cpclearcache-form-' + index; var $checkboxes = $(this).find('.checkbox-select'); new Garnish.CheckboxSelect($checkboxes); var checkedBoxes = Craft.getLocalStorage(_this.localStorageKey);