Issue #3305706 by znerol, SandeepSingh199, ivnish, smustgrave, Spokje, økse, ranjith_kumar_k_u, coffeemakr, DavorHorvacki: Uncaught TypeError: this.$pluginSelect.find(...)[0] is undefined

merge-requests/3294/head
Lee Rowlands 2023-01-26 11:02:05 +10:00
parent 6c8431c0ec
commit d6689fcbdb
No known key found for this signature in database
GPG Key ID: 2B829A3DF9204DC4
1 changed files with 5 additions and 1 deletions

View File

@ -365,10 +365,14 @@
// disabled previously. Pseudo-fields do not have default formatters,
// we just return to 'visible' for those.
if (this.region === 'hidden') {
const pluginSelect =
typeof this.$pluginSelect.find('option')[0] !== 'undefined'
? this.$pluginSelect.find('option')[0].value
: undefined;
const value =
typeof this.defaultPlugin !== 'undefined'
? this.defaultPlugin
: this.$pluginSelect.find('option')[0].value;
: pluginSelect;
if (typeof value !== 'undefined') {
if (this.$pluginSelect.length) {