mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fixes JSHint error on PageDown. Updated for Uniform Access Principle.
This commit is contained in:
parent
88bb25f2f6
commit
3b7ac014de
@ -32,15 +32,14 @@ Discourse.PagedownEditor = Ember.ContainerView.extend({
|
|||||||
didInsertElement: function() {
|
didInsertElement: function() {
|
||||||
var $wmdInput = $('#wmd-input');
|
var $wmdInput = $('#wmd-input');
|
||||||
$wmdInput.data('init', true);
|
$wmdInput.data('init', true);
|
||||||
this.editor = Discourse.Markdown.createEditor();
|
this.set('editor', Discourse.Markdown.createEditor());
|
||||||
return this.editor.run();
|
return this.get('editor').run();
|
||||||
},
|
},
|
||||||
|
|
||||||
observeValue: (function() {
|
observeValue: (function() {
|
||||||
var _this = this;
|
var editor = this.get('editor');
|
||||||
Ember.run.next(null, function() {
|
if (!editor) return;
|
||||||
_this.editor && _this.editor.refreshPreview();
|
Ember.run.next(null, function() { editor.refreshPreview(); });
|
||||||
});
|
|
||||||
}).observes('value')
|
}).observes('value')
|
||||||
|
|
||||||
});
|
});
|
||||||
|
Loading…
Reference in New Issue
Block a user