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
This commit is contained in:
Cody Jackson 2020-04-27 13:36:39 -07:00
parent 16890fe322
commit 6cb28d6005
1 changed files with 1 additions and 1 deletions

View File

@ -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)