fix(front): fix group settings getting unresponsive because of reactive bug

Closes #1298

Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
Thomas Citharel 2023-06-02 09:40:12 +02:00
parent b69ffacff5
commit f1e119cb7a
No known key found for this signature in database
GPG key ID: A061B9DDE0CA0773

View file

@ -344,11 +344,11 @@ const canShowCopyButton = computed((): boolean => {
});
const currentAddress = computed({
get(): IAddress {
return new Address(editableGroup.value?.physicalAddress);
get(): IAddress | null {
return editableGroup.value?.physicalAddress ?? null;
},
set(address: IAddress) {
if (editableGroup.value) {
set(address: IAddress | null) {
if (editableGroup.value && address) {
editableGroup.value = {
...editableGroup.value,
physicalAddress: address,