Minor fixes (#1103)

Signed-off-by: Denis Bykhov <80476319+BykhovDenis@users.noreply.github.com>
This commit is contained in:
Denis Bykhov
2022-03-05 11:59:27 +07:00
committed by GitHub
parent d22fbaee48
commit 07ad3bba09
6 changed files with 18 additions and 16 deletions
@@ -72,18 +72,13 @@
if (!opened) {
opened = true
showPopup(UsersPopup, { _class, title, caption, allowDeselect, selected: value, titleDeselect }, container, (result) => {
if (result === undefined) {
// Value is not changed.
opened = false
return
}
if (result != null) {
value = result._id
dispatch('change', value)
} else {
if (result === null) {
value = null
selected = undefined
dispatch('change', null)
} else if (result !== undefined && result._id !== value) {
value = result._id
dispatch('change', value)
}
opened = false
})