Skip to content
This repository was archived by the owner on Jan 16, 2022. It is now read-only.

Commit 323fbb0

Browse files
committed
fix: isObject import
1 parent 21d54c5 commit 323fbb0

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/pages/Version/DetailContainer/UpLinks/__snapshots__/UpLinks.test.tsx.snap

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ Object {
128128
<span
129129
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
130130
>
131-
2 years ago
131+
3 years ago
132132
</span>
133133
</div>
134134
</li>
@@ -186,7 +186,7 @@ Object {
186186
<span
187187
class="MuiTypography-root MuiListItemText-primary MuiTypography-body1 MuiTypography-displayBlock"
188188
>
189-
2 years ago
189+
3 years ago
190190
</span>
191191
</div>
192192
</li>

src/utils/package.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
import { isObject } from 'util';
2-
31
import { UpLinks } from '@verdaccio/types';
42
import dayjs from 'dayjs';
53
import localizedFormat from 'dayjs/plugin/localizedFormat';
@@ -25,7 +23,7 @@ export function formatLicense(license: any): string | undefined {
2523
return license;
2624
}
2725

28-
if (license && isObject(license) && license.type) {
26+
if (license?.type) {
2927
return license.type;
3028
}
3129

@@ -49,7 +47,7 @@ export function formatRepository(repository: any): string | null {
4947
return repository;
5048
}
5149

52-
if (repository && isObject(repository) && repository.url) {
50+
if (repository?.url) {
5351
return repository.url;
5452
}
5553

0 commit comments

Comments
 (0)