Skip to content

Commit

Permalink
Fixed tsc check
Browse files Browse the repository at this point in the history
  • Loading branch information
zfurtak committed Sep 20, 2024
1 parent 3f8676a commit d1776d3
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
7 changes: 5 additions & 2 deletions src/libs/actions/Policy/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,10 @@ function clearPolicyTagListErrors(policyID: string, tagListIndex: number) {
function renamePolicyTag(policyID: string, policyTag: {oldName: string; newName: string}, tagListIndex: number) {
const policy = PolicyUtils.getPolicy(policyID);
const tagList = PolicyUtils.getTagLists(allPolicyTags?.[`${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`] ?? {})?.at(tagListIndex);
const tag = tagList?.tags?.[policyTag.oldName];
if (!tagList) {
return;
}
const tag = tagList.tags?.[policyTag.oldName];
const oldTagName = policyTag.oldName;
const newTagName = PolicyUtils.escapeTagName(policyTag.newName);

Expand Down Expand Up @@ -506,7 +509,7 @@ function renamePolicyTag(policyID: string, policyTag: {oldName: string; newName:
onyxMethod: Onyx.METHOD.MERGE,
key: `${ONYXKEYS.COLLECTION.POLICY_TAGS}${policyID}`,
value: {
[tagList.name]: {
[tagList?.name]: {
tags: {
[oldTagName]: null,
[newTagName]: {
Expand Down
4 changes: 3 additions & 1 deletion src/pages/Debug/DebugDetails.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,13 @@ function DebugDetails({data, onSave, onDelete, validate}: DebugDetailsProps) {
const {translate} = useLocalize();
const styles = useThemeStyles();
const [formDraftData] = useOnyx(ONYXKEYS.FORMS.DEBUG_DETAILS_FORM_DRAFT);
const arr = [];
arr[2] = 'lalala';
const booleanFields = useMemo(
() =>
Object.entries(data ?? {})
.filter(([, value]) => typeof value === 'boolean')
.sort((a, b) => a[0].localeCompare(b[0])) as Array<[string, boolean]>,
.sort((a, b) => a.at(0).localeCompare(b[0])) as Array<[string, boolean]>,

Check failure on line 51 in src/pages/Debug/DebugDetails.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unsafe return of an `any` typed value

Check failure on line 51 in src/pages/Debug/DebugDetails.tsx

View workflow job for this annotation

GitHub Actions / Changed files ESLint check

Unsafe call of an `any` typed value

Check failure on line 51 in src/pages/Debug/DebugDetails.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Unsafe return of an `any` typed value

Check failure on line 51 in src/pages/Debug/DebugDetails.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Unsafe call of an `any` typed value

Check failure on line 51 in src/pages/Debug/DebugDetails.tsx

View workflow job for this annotation

GitHub Actions / ESLint check

Unsafe member access .localeCompare on an `any` value
[data],
);
const constantFields = useMemo(
Expand Down

0 comments on commit d1776d3

Please sign in to comment.