From 747ac1f32b270d29afdbf9af4cd6f0edf2875137 Mon Sep 17 00:00:00 2001 From: Antanina Druzhkina Date: Sat, 4 May 2024 23:00:03 +0400 Subject: [PATCH] #1101: fix issue with adding link by typing in FilePicker "From a link" tab --- .../filePicker/LinkFilePickerTab/LinkFilePickerTab.tsx | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/controls/filePicker/LinkFilePickerTab/LinkFilePickerTab.tsx b/src/controls/filePicker/LinkFilePickerTab/LinkFilePickerTab.tsx index d037cb8ed..cc707c005 100644 --- a/src/controls/filePicker/LinkFilePickerTab/LinkFilePickerTab.tsx +++ b/src/controls/filePicker/LinkFilePickerTab/LinkFilePickerTab.tsx @@ -34,7 +34,6 @@ export default class LinkFilePickerTab extends React.Component this._getErrorMessagePromise(value)} autoAdjustHeight={false} underlined={false} @@ -64,7 +63,7 @@ export default class LinkFilePickerTab extends React.Component { - const filePickerResult: IFilePickerResult = fileUrl && this._isUrl(fileUrl) ? { + const filePickerResult: IFilePickerResult = fileUrl ? { fileAbsoluteUrl: fileUrl, fileName: GeneralHelper.getFileNameFromUrl(fileUrl), fileNameWithoutExtension: GeneralHelper.getFileNameWithoutExtension(fileUrl), @@ -81,7 +80,7 @@ export default class LinkFilePickerTab extends React.Component => { // DOn't give an error for blank or placeholder value, but don't make it a valid entry either - if (value === undefined || value === 'https://') { + if (value === undefined || value === '') { this.setState({ isValid: false }); return ''; } @@ -89,7 +88,7 @@ export default class LinkFilePickerTab extends React.Component