Fix deleting signature nodes

Code in ve.dm.MWTransclusionNode (which ve.dm.MWSignatureNode extends)
expects the node data to have an 'attributes' property.

We could override a bunch of methods to fix this, or add checks in the
original code, but it seems more future-proof to instead ensure that
the property exists.

Bug: T248585
Change-Id: I5bd721ca73605a396509669145b740db7283afd3
This commit is contained in:
Bartosz Dziewoński 2020-05-12 01:01:18 +02:00
parent a5b0eaaaec
commit 21b25bd77d

View file

@ -39,7 +39,7 @@ if ( mw.Title.wantSignaturesNamespace( mw.config.get( 'wgNamespaceNumber' ) ) )
new ve.ui.Command( 'mwSignature', 'content', 'insert', {
args: [
[
{ type: 'mwSignature' },
{ type: 'mwSignature', attributes: {} },
{ type: '/mwSignature' }
],
// annotate