diff --git a/modules/ve-mw/ui/dialogs/ve.ui.MWCitationDialog.js b/modules/ve-mw/ui/dialogs/ve.ui.MWCitationDialog.js index cb2b10656e..a04f8e27b3 100644 --- a/modules/ve-mw/ui/dialogs/ve.ui.MWCitationDialog.js +++ b/modules/ve-mw/ui/dialogs/ve.ui.MWCitationDialog.js @@ -90,7 +90,7 @@ ve.ui.MWCitationDialog.prototype.saveChanges = function () { obj = this.transclusion.getPlainObject(); if ( !this.referenceModel ) { - surfaceModel.getFragment().collapseRangeToEnd(); + this.getFragment().collapseRangeToEnd(); this.referenceModel = new ve.dm.MWReferenceModel(); this.referenceModel.insertInternalItem( surfaceModel ); this.referenceModel.insertReferenceNode( surfaceFragment );