Skip to content

Commit

Permalink
Revert "Code formatting"
Browse files Browse the repository at this point in the history
This reverts commit 96e588d.
  • Loading branch information
cedx committed Dec 7, 2024
1 parent 96e588d commit b6f4591
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/blog.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ export class Blog
# Creates a new blog from the specified JSON object.
@fromJson: (json) -> new @
charset: if typeof json.blog_charset is "string" then json.blog_charset else ""
languages: if typeof json.blog_lang is "string" then json.blog_lang.split(",").map ($) -> $.trim() else []
languages: if typeof json.blog_lang is "string" then json.blog_lang.split(",").map (language) -> language.trim() else []
url: if typeof json.blog is "string" then json.blog else ""

# Returns a JSON representation of this object.
Expand Down
2 changes: 1 addition & 1 deletion src/comment.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export class Comment

# Creates a new comment from the specified JSON object.
@fromJson: (json) ->
hasAuthor = Object.keys(json).filter(($) -> $.startsWith("comment_author") or $.startsWith("user")).length > 0
hasAuthor = Object.keys(json).filter((key) -> key.startsWith("comment_author") or key.startsWith("user")).length > 0
new @
author: if hasAuthor then Author.fromJson json else null
content: if typeof json.comment_content is "string" then json.comment_content else ""
Expand Down

0 comments on commit b6f4591

Please sign in to comment.