mirror of
https://github.com/discourse/discourse.git
synced 2024-11-26 21:43:46 +08: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() {
|
||||
var $wmdInput = $('#wmd-input');
|
||||
$wmdInput.data('init', true);
|
||||
this.editor = Discourse.Markdown.createEditor();
|
||||
return this.editor.run();
|
||||
this.set('editor', Discourse.Markdown.createEditor());
|
||||
return this.get('editor').run();
|
||||
},
|
||||
|
||||
observeValue: (function() {
|
||||
var _this = this;
|
||||
Ember.run.next(null, function() {
|
||||
_this.editor && _this.editor.refreshPreview();
|
||||
});
|
||||
var editor = this.get('editor');
|
||||
if (!editor) return;
|
||||
Ember.run.next(null, function() { editor.refreshPreview(); });
|
||||
}).observes('value')
|
||||
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user