http://www.mediawiki.org/wiki/Special:Code/MediaWiki/96058

Revision: 96058
Author:   inez
Date:     2011-09-01 22:56:27 +0000 (Thu, 01 Sep 2011)
Log Message:
-----------
Fix es.ContentSeries.lookup method

Modified Paths:
--------------
    trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js

Modified: trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js
===================================================================
--- trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js   2011-09-01 
22:55:41 UTC (rev 96057)
+++ trunk/parsers/wikidom/lib/synth/bases/es.ContentSeries.js   2011-09-01 
22:56:27 UTC (rev 96058)
@@ -12,11 +12,11 @@
 es.ContentSeries.prototype.lookup = function( offset ) {
        if ( this.length ) {
                var i = 0,
-                       legnth = this.length,
+                       length = this.length,
                        left = 0,
                        right;
                while ( i < length ) {
-                       right = left + this[i].getLength();
+                       right = left + this[i].getLength() + 1;
                        if ( offset >= left && offset < right ) {
                                return this[i];
                        }
@@ -30,7 +30,7 @@
 es.ContentSeries.prototype.offsetOf = function( item ) {
        if ( this.length ) {
                var i = 0,
-                       legnth = this.length,
+                       length = this.length,
                        left = 0;
                while ( i < length ) {
                        if ( this[i] === item ) {


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to