mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-03-11 02:12:21 -05:00
Fix notification bug
The date stored in the model is in a different format and needs to be converted before being checked. Otherwise, any blur event will trigger the notification that the date has been changed, even if the date is the same.
This commit is contained in:
parent
5f3f0d013b
commit
88d0303093
1 changed files with 2 additions and 2 deletions
|
@ -90,7 +90,7 @@
|
|||
newPubDate = pubDateEl.value;
|
||||
|
||||
// Ensure the published date has changed
|
||||
if (newPubDate.length === 0 || pubDate === newPubDate) {
|
||||
if (newPubDate.length === 0 || moment(pubDate).format("DD MMM YY") === newPubDate) {
|
||||
pubDateEl.value = pubDate === undefined ? 'Not Published' : moment(pubDate).format("DD MMM YY");
|
||||
return;
|
||||
}
|
||||
|
@ -192,4 +192,4 @@
|
|||
|
||||
});
|
||||
|
||||
}());
|
||||
}());
|
||||
|
|
Loading…
Add table
Reference in a new issue