mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-05 09:50:34 +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
4fa188f949
commit
623a2362ac
@ -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