Skip to content

Commit

Permalink
fix: more lint errors
Browse files Browse the repository at this point in the history
fix: more lint errors
  • Loading branch information
allroundexperts committed Aug 6, 2023
1 parent 113b6fd commit 134e7ca
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
13 changes: 7 additions & 6 deletions src/components/AvatarWithImagePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ import * as FileUtils from '../libs/fileDownload/FileUtils';
import getImageResolution from '../libs/fileDownload/getImageResolution';
import PressableWithoutFeedback from './Pressable/PressableWithoutFeedback';
import DotIndicatorMessage from './DotIndicatorMessage';
import {isSafari} from '../libs/Browser';
import * as Browser from '../libs/Browser';

const propTypes = {
/** Avatar source to display */
Expand Down Expand Up @@ -280,11 +280,12 @@ class AvatarWithImagePicker extends React.Component {
icon: Expensicons.Upload,
text: this.props.translate('avatarWithImagePicker.uploadPhoto'),
onSelected: () => {
if (!isSafari()) {
openPicker({
onPicked: this.showAvatarCropModal,
});
if (Browser.isSafari()) {
return;
}
openPicker({
onPicked: this.showAvatarCropModal,
});
},
},
];
Expand All @@ -309,7 +310,7 @@ class AvatarWithImagePicker extends React.Component {
// In order for the file picker to open dynamically, the click
// function must be called from within a event handler that was initiated
// by the user on Safari.
if (index === 0 && isSafari()) {
if (index === 0 && Browser.isSafari()) {
openPicker({
onPicked: this.showAvatarCropModal,
});
Expand Down
5 changes: 3 additions & 2 deletions src/pages/home/report/ReportActionCompose.js
Original file line number Diff line number Diff line change
Expand Up @@ -1057,9 +1057,10 @@ class ReportActionCompose extends React.Component {
icon: Expensicons.Paperclip,
text: this.props.translate('reportActionCompose.addAttachment'),
onSelected: () => {
if (!Browser.isSafari()) {
triggerAttachmentPicker();
if (Browser.isSafari()) {
return;
}
triggerAttachmentPicker();
},
},
];
Expand Down

0 comments on commit 134e7ca

Please sign in to comment.