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'),
// convenience method for saving the post and performing post-save cleanup
_savePostTask: task(function* (options) {
_savePostTask: task(function* (options = {}) {
let {post} = this;
const previousEmailOnlyValue = this.post.emailOnly;