r102660 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r102659‎ | r102660 | r102661 >
Date:15:13, 10 November 2011
Author:catrope
Status:deferred
Tags:
Comment:
Fix JS error when getElementType() is called on a document node
Modified paths:
  • /trunk/extensions/VisualEditor/modules/es/bases/es.DocumentModelNode.js (modified) (history)

Diff [purge]

Index: trunk/extensions/VisualEditor/modules/es/bases/es.DocumentModelNode.js
@@ -197,7 +197,12 @@
198198 * @returns {String} Symbolic name of element type
199199 */
200200 es.DocumentModelNode.prototype.getElementType = function() {
201 - return this.element.type;
 201+ //return this.element.type;
 202+ // We can't use this.element.type because this.element may be null
 203+ // So this function now returns this.type and should really be called
 204+ // getType()
 205+ // TODO: Do we care?
 206+ return this.type;
202207 };
203208
204209 /**

Status & tagging log