mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-11-14 11:05:50 +03: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
@ -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…
Reference in New Issue
Block a user