From 6cb28d6005294ac57f90d7543e444dc520d97342 Mon Sep 17 00:00:00 2001 From: Cody Jackson Date: Mon, 27 Apr 2020 13:36:39 -0700 Subject: [PATCH] Fixing a jquery usage error When deprecating the old usage of jquery I erroneously converted this section. The element wasn't being referenced properly anymore. This fixes an exception which was preventing the page from rendering monitoring metric options. rancher/rancher#26829 --- lib/alert/addon/components/alert-select/component.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/alert/addon/components/alert-select/component.js b/lib/alert/addon/components/alert-select/component.js index 366aaa21d..cddbdbb0b 100644 --- a/lib/alert/addon/components/alert-select/component.js +++ b/lib/alert/addon/components/alert-select/component.js @@ -20,7 +20,7 @@ export default Select.extend({ return; } - const toBottom = $('body').height() - $($()[0]).offset().top - 60; // eslint-disable-line + const toBottom = $('body').height() - $(this.element).offset().top - 60; // eslint-disable-line set(this, 'maxHeight', toBottom < MAX_HEIGHT ? toBottom : MAX_HEIGHT)