8000 style(Paste): use `?.` operator instead of `||` · cAttte/pastebin.js@06c3888 · GitHub
[go: up one dir, main page]

Skip to content
This repository was archived by the owner on Jul 6, 2025. It is now read-only.

Commit 06c3888

Browse files
committed
style(Paste): use ?. operator instead of ||
1 parent 1bdcfa0 commit 06c3888

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/struct/Paste.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ export default class Paste {
7474
this.title = data.title
7575
this.author = data.author
7676
this.content = data.content
77-
this.size = data.size || (data.content || {}).length
77+
this.size = data.size || data.content?.length
7878
this.date = data.date
7979
this.format = data.format
8080
this.privacy = resolvePrivacy(data.privacy)

0 commit comments

Comments
 (0)
0