Skip to content

Commit

Permalink
fix: 无效日期的情况
Browse files Browse the repository at this point in the history
  • Loading branch information
thatsgolden committed Sep 21, 2024
1 parent 2ebe936 commit 9892e78
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"backgroundPosition": "center"
}
},
"flagrow": {
"extiverse": {
"discuss": "https://discuss.flarum.org/d/22690"
},
"flarum-locale": {
Expand Down
2 changes: 1 addition & 1 deletion js/dist/forum.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/dist/forum.js.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion js/src/forum/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ app.initializers.add('flarum-lang/chinese-simplified', () => {

original(...args);

if(isZhHans && reformatTime && this.stream.description) {
if(isZhHans && reformatTime && this.stream.description && dayjs(this.stream.description).isValid()) {
this.stream.description = dayjs(this.stream.description).format('YYYY年MMM');
}
});
Expand Down

0 comments on commit 9892e78

Please sign in to comment.