mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/VisualEditor
synced 2024-09-27 20:26:46 +00:00
0054cd2a57
Exception was caused by passing -1 to getAnnotationsFromOffset(). So check for -1 before passing it in; getNearestContentOffset() can legitimately return -1 if there are no content offsets in the document, which occurs when the document is empty. I was originally going to change getNearestContentOffset(start - 1, -1) to getRelativeContentOffset(start, -1), but Inez correctly pointed out that that would have unwanted results when near an inline node. Change-Id: Ife4b497b1c5fd04d411bb25cea99e6ea2abf146f |
||
---|---|---|
.. | ||
annotations | ||
nodes | ||
ve.dm.Annotation.js | ||
ve.dm.AnnotationFactory.js | ||
ve.dm.BranchNode.js | ||
ve.dm.Converter.js | ||
ve.dm.Document.js | ||
ve.dm.DocumentSynchronizer.js | ||
ve.dm.js | ||
ve.dm.LeafNode.js | ||
ve.dm.Node.js | ||
ve.dm.NodeFactory.js | ||
ve.dm.Surface.js | ||
ve.dm.SurfaceFragment.js | ||
ve.dm.Transaction.js | ||
ve.dm.TransactionProcessor.js |