Skip to content

Commit

Permalink
Fix clearing the label of a share
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
danxuliu authored and backportbot[bot] committed Jan 8, 2021
1 parent f66d88c commit aee7ebe
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion apps/files_sharing/src/components/SharingEntryLink.vue
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@
:class="{ error: errors.label }"
:disabled="saving"
:aria-label="t('files_sharing', 'Share label')"
:value="share.newLabel || share.label"
:value="share.newLabel !== undefined ? share.newLabel : share.label"
icon="icon-edit"
maxlength="255"
@update:value="onLabelChange"
Expand Down

0 comments on commit aee7ebe

Please sign in to comment.