0
Fork 0
mirror of https://github.com/TryGhost/Ghost.git synced 2025-02-24 23:48:13 -05:00

Fixed error when calling hasOwnProperty on null/undefined when saving posts

refs 89a6bc683b

- `options` did not have a default value and it's always passed in. Added a default value of an empty object so we're not tripped up with null/undefined
This commit is contained in:
Kevin Ansfield 2021-10-15 15:49:19 +01:00
parent 89a6bc683b
commit 847aabd5f4

View file

@ -670,7 +670,7 @@ export default Controller.extend({
}).group('saveTasks'), }).group('saveTasks'),
// convenience method for saving the post and performing post-save cleanup // convenience method for saving the post and performing post-save cleanup
_savePostTask: task(function* (options) { _savePostTask: task(function* (options = {}) {
let {post} = this; let {post} = this;
const previousEmailOnlyValue = this.post.emailOnly; const previousEmailOnlyValue = this.post.emailOnly;