mirror of
https://github.com/TryGhost/Ghost.git
synced 2025-01-13 22:41:32 -05:00
guard against missing $previewContent/ViewPort in gh-editor.scrollPosition
issue #5659 - fixes occasional issue with editor not rendering due to scrollPosition being requested before the relevant jquery elements have been set
This commit is contained in:
parent
4e4de10e19
commit
c07f33f5ad
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ export default Ember.Component.extend({
|
|||
// scrollPosition value such that when either scrolling or typing-at-the-end of the text editor the preview pane
|
||||
// stays in sync
|
||||
scrollPosition: Ember.computed('editorScrollInfo', 'height', function () {
|
||||
if (!this.get('editorScrollInfo')) {
|
||||
if (!this.get('editorScrollInfo') || !this.get('$previewContent') || !this.get('$previewViewPort')) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue