Skip to content

Commit

Permalink
Merge pull request #5889 from facebook/chore/eslint-valid-typeof
Browse files Browse the repository at this point in the history
Fix eslint warnings for valid-typeof
  • Loading branch information
HelNershingThapa authored Jun 22, 2023
2 parents 9582691 + 102227e commit d1e1c9f
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion frontend/src/components/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ export default function Editor({ setDisable, comment, presets, imagery, gpxUrl }
const iDContext = useSelector((state) => state.editor.context);
const locale = useSelector((state) => state.preferences.locale);
const [customImageryIsSet, setCustomImageryIsSet] = useState(false);
const windowInit = typeof window !== undefined;
const windowInit = typeof window !== 'undefined';
const customSource =
iDContext && iDContext.background() && iDContext.background().findSource('custom');

Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/rapidEditor.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ export default function RapidEditor({
const RapiDContext = useSelector((state) => state.editor.rapidContext);
const locale = useSelector((state) => state.preferences.locale);
const [customImageryIsSet, setCustomImageryIsSet] = useState(false);
const windowInit = typeof window !== undefined;
const windowInit = typeof window !== 'undefined';
const customSource =
RapiDContext && RapiDContext.background() && RapiDContext.background().findSource('custom');

Expand Down
6 changes: 1 addition & 5 deletions frontend/src/components/teamsAndOrgs/teams.js
Original file line number Diff line number Diff line change
Expand Up @@ -316,11 +316,7 @@ export function TeamSideBar({ team, members, managers, requestedToJoin }: Object
showLoadingAnimation={true}
type="media"
rows={20}
ready={
typeof team.teamId === 'number' &&
typeof organisations !== undefined &&
typeof pmTeams !== undefined
}
ready={typeof team.teamId === 'number'}
>
<div className="cf pb2">
<div className="w-20 pv2 dib fl">
Expand Down
4 changes: 2 additions & 2 deletions frontend/src/components/user/content.js
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function OSMCard({ username }: Object) {
showLoadingAnimation={true}
rows={1}
delay={100}
ready={typeof osmUserInfo !== undefined}
ready={typeof osmUserInfo !== 'undefined'}
>
<FormattedRelativeTime value={value} unit={unit} />
</ReactPlaceholder>
Expand All @@ -72,7 +72,7 @@ export function OSMCard({ username }: Object) {
showLoadingAnimation={true}
rows={1}
delay={100}
ready={typeof osmUserInfo !== undefined}
ready={typeof osmUserInfo !== 'undefined'}
>
<FormattedNumber value={osmUserInfo ? osmUserInfo.changesetCount : 0} />
</ReactPlaceholder>
Expand Down

0 comments on commit d1e1c9f

Please sign in to comment.