REFACTOR: this.$() deprecation (#7928)

This commit is contained in:
Joffrey JAFFEUX 2019-07-24 13:17:36 +02:00 committed by GitHub
parent 864f68725a
commit e444ce7ccd
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 1 deletions

View File

@ -868,7 +868,8 @@ export default Ember.Component.extend({
// wraps previewed upload markdown in a codeblock in its own class to keep a track
// of indexes later on to replace the correct upload placeholder in the composer
if ($preview.find(".codeblock-image").length === 0) {
this.$(".d-editor-preview *")
$(this.element)
.find(".d-editor-preview *")
.contents()
.each(function() {
if (this.nodeType !== 3) return; // TEXT_NODE