Fix clearing the label of a share

When the label is being edited its value is stored in "newLabel", and
the original label is shown only if "newLabel" is not set. However, as
it was checked against any falsy value instead of only undefined when
the label was cleared and thus it has an empty value the original label
was shown instead.

Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Signed-off-by: npmbuildbot-nextcloud[bot] <npmbuildbot-nextcloud[bot]@users.noreply.github.com>
This commit is contained in:
Daniel Calviño Sánchez 2021-01-07 18:10:11 +01:00 committed by npmbuildbot-nextcloud[bot]
parent f66d88c85a
commit b078f28029
3 changed files with 3 additions and 3 deletions

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -138,7 +138,7 @@
:class="{ error: errors.label }" :class="{ error: errors.label }"
:disabled="saving" :disabled="saving"
:aria-label="t('files_sharing', 'Share label')" :aria-label="t('files_sharing', 'Share label')"
:value="share.newLabel || share.label" :value="share.newLabel !== undefined ? share.newLabel : share.label"
icon="icon-edit" icon="icon-edit"
maxlength="255" maxlength="255"
@update:value="onLabelChange" @update:value="onLabelChange"