mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-11-24 06:24:08 +00:00
ve.ui.MWLiveExtensionInspector: Account for this.selectedNode being null in debounced method
Change-Id: I74ab091d3bfbdd9290429cd50688f458118701e7
This commit is contained in:
parent
0b1f41a07d
commit
420c0f6c10
|
@ -126,6 +126,10 @@ ve.ui.MWLiveExtensionInspector.prototype.onChange = function () {
|
|||
* Update the node rendering to reflect the current content in the inspector.
|
||||
*/
|
||||
ve.ui.MWLiveExtensionInspector.prototype.updatePreview = function () {
|
||||
if ( !this.selectedNode ) {
|
||||
// Method is called debounced, so selectedNode may not still exist
|
||||
return;
|
||||
}
|
||||
var mwData = ve.copy( this.selectedNode.getAttribute( 'mw' ) );
|
||||
|
||||
this.updateMwData( mwData );
|
||||
|
|
Loading…
Reference in a new issue