Skip to content

Commit

Permalink
new version
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarotero committed Dec 3, 2024
1 parent 318b96a commit b46ac17
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 5 deletions.
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/) and this
project adheres to [Semantic Versioning](http://semver.org/).

## [0.3.2] - 2024-12-03
### Fixed
- Don't clean the innerHTML if there's no comments.

## [0.3.1] - 2024-12-02
### Fixed
- Undefined variable error
Expand Down Expand Up @@ -45,6 +49,7 @@ First version
[#1]: https://github.com/oom-components/mastodon-comments/issues/1
[#2]: https://github.com/oom-components/mastodon-comments/issues/2

[0.3.2]: https://github.com/oom-components/mastodon-comments/compare/v0.3.1...v0.3.2
[0.3.1]: https://github.com/oom-components/mastodon-comments/compare/v0.3.0...v0.3.1
[0.3.0]: https://github.com/oom-components/mastodon-comments/compare/v0.2.2...v0.3.0
[0.2.2]: https://github.com/oom-components/mastodon-comments/compare/v0.2.1...v0.2.2
Expand Down
10 changes: 5 additions & 5 deletions src/comments.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,14 +44,14 @@ export default class SocialComments extends HTMLElement {
const comments = [
...this.comments.mastodon || [],
...this.comments.bluesky || [],
];

const sorted = comments.sort(
].sort(
(a, b) => new Date(a.createdAt) - new Date(b.createdAt),
);

this.innerHTML = "";
this.render(this, sorted);
if (comments.length) {
this.innerHTML = "";
this.render(this, comments);
}
}

async #fetchBluesky(url) {
Expand Down

0 comments on commit b46ac17

Please sign in to comment.