Revert "Followup c41f96c: doc parameter in ve.dm.InternalList constructor is not optional, remove check"

> Uncaught TypeError: Cannot call method 'connect' of undefined

This reverts commit fb4dcf3030.

Change-Id: I9db92e7bf339260d8de0a9406842bdb241b8ee80
This commit is contained in:
Krinkle 2013-10-23 20:28:55 +00:00
parent fb4dcf3030
commit 661e43c245

View file

@ -29,7 +29,9 @@ ve.dm.InternalList = function VeDmInternalList( doc ) {
this.nextUniqueNumber = 0;
// Event handlers
this.document.connect( this, { 'transact': 'onTransact' } );
if ( doc ) {
doc.connect( this, { 'transact': 'onTransact' } );
}
};
/* Inheritance */