forked from TryGhost/Ghost
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🎨 fix previos/current date comparison (isEqual in bookshelf) (TryGhos…
…t#8357) no issue - client dates are sent as ISO format (moment(..).format()) - server dates are in JS Date format >> when bookshelf fetches data from the database, all dates are transformed into JS dates >> see `parse` helper function - Bookshelf updates the model with the client data via Bookshelf's `set` function - therefor Bookshelf uses a simple `isEqual` function from lodash to detect changes - .previous(attr) and .get(attr) return false - that has the concequence that dates are always marked as "changed" - internally we use our `hasDateChanged` if we have to compare previous/updated dates - but Bookshelf is not in our control for this case
- Loading branch information
Showing
2 changed files
with
44 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters