[TikiWiki-commits] [Git][tikiwiki/tiki][master] [FIX] applySelect: null-safe jQuery .val() in MutationObserver filter
"Bruno Kambere \(@kambereBr\) via TikiWiki-cvs" <[email protected]> Thu, 16 Jul 2026 17:59:31 +0000
| Newsgroups | gmane.comp.cms.tiki.cvs |
|---|---|
| Message-ID | <6a591c03e3798_3839ecb60634d4@gitlab-sidekiq-low-urgency-cpu-bound-v2-77c895df49-bqtwh.mail> |
Bruno Kambere pushed to branch master at Tiki Wiki CMS Groupware / Tiki
Commits:
fbe22a46 by Landry Bitege at 2026-07-16T20:40:30+03:00
[FIX] applySelect: null-safe jQuery .val() in MutationObserver filter
---
* [FIX] applySelect: null-safe jQuery .val() in MutationObserver filter
See merge request tikiwiki/tiki!10605
- - - - -
1 changed file:
- src/js/vue-widgets/element-plus-ui/src/helpers/select/applySelect.js
Changes:
=====================================
src/js/vue-widgets/element-plus-ui/src/helpers/select/applySelect.js
=====================================
@@ -7,9 +7,11 @@ export function observeSelectElementMutations(select, elementPlusUi) {
do not alter the Element Plus select options, as those already exist
in the UI element and would only disrupt the UI picker options.
*/
+ const rawVal = $(select).val() ?? [];
+ const selectedVals = Array.isArray(rawVal) ? rawVal : [rawVal];
const newOptions = $(select)
.find("option")
- .filter((_, option) => $(option).val() && !$(select).val().includes($(option).val()));
+ .filter((_, option) => $(option).val() && !selectedVals.includes($(option).val()));
if (newOptions.length) {
syncSelectOptions(elementPlusUi, select);
}
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fbe22a460fae0985b7aaff94d4ea366e737e2d9a
--
View it on GitLab: https://gitlab.com/tikiwiki/tiki/-/commit/fbe22a460fae0985b7aaff94d4ea366e737e2d9a
You're receiving this email because of your account on gitlab.com. Manage all notifications: https://gitlab.com/-/profile/notifications | Help: https://gitlab.com/help
_______________________________________________
TikiWiki-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tikiwiki-cvs