Created
August 13, 2015 16:24
-
-
Save LinzardMac/55fe293a14271d9ace94 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @returns {wp.media.view.AttachmentCompat} Returns itself to allow chaining | |
*/ | |
render: function() { | |
var compat = this.model.get('compat'); | |
if ( ! compat || ! compat.item ) { | |
return; | |
} | |
this.$el.empty().append(this.$el); | |
this.views.detach(); | |
//i think the use of .html might be part of the problem? | |
this.$el.html( compat.item ); | |
// this.views.delegateEvents(); <`` tosses delegateEvents() not defined error | |
this.views.render(); | |
//console.log(this); | |
return this; | |
}, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment