From b47d6fc7027566964497e3673953ad373b26b4ca Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 10 Jun 2022 10:42:37 -0600 Subject: [PATCH] Et2SelectAccount: Fix TypeError: Cannot set property select_options of # which has only a getter --- api/js/etemplate/Et2Select/Et2SelectAccount.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/api/js/etemplate/Et2Select/Et2SelectAccount.ts b/api/js/etemplate/Et2Select/Et2SelectAccount.ts index acc916c642..b1fb461937 100644 --- a/api/js/etemplate/Et2Select/Et2SelectAccount.ts +++ b/api/js/etemplate/Et2Select/Et2SelectAccount.ts @@ -53,7 +53,7 @@ export class Et2SelectAccount extends Et2Select get select_options() : Array { const type = this.egw().preference('account_selection', 'common'); - if (type === 'none' && typeof egw.user('apps').admin === 'undefined') + if(type === 'none' && typeof this.egw().user('apps').admin === 'undefined') { return []; } @@ -73,7 +73,11 @@ export class Et2SelectAccount extends Et2Select } return select_options; } + + set select_options(new_options : SelectOption[]) + { + super.select_options = new_options; + } } -// @ts-ignore TypeScript is not recognizing that this widget is a LitElement customElements.define("et2-select-account", Et2SelectAccount); \ No newline at end of file