mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
Merge pull request #5689 from kevinansfield/fix-property-val-of-undefined
Fix occasional `Cannot read property 'val' of undefined` errors in console
This commit is contained in:
commit
f1a602e3f9
1 changed files with 7 additions and 0 deletions
|
@ -248,6 +248,13 @@ export default Ember.Mixin.create({
|
|||
|
||||
options = options || {};
|
||||
|
||||
// when navigating quickly between pages autoSave will occasionally
|
||||
// try to run after the editor has been torn down so bail out here
|
||||
// before we throw errors
|
||||
if (!this.get('editor').$()) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
this.toggleProperty('submitting');
|
||||
|
||||
if (options.backgroundSave) {
|
||||
|
|
Loading…
Add table
Reference in a new issue