Index: trunk/extensions/LiveTranslate/includes/ext.livetranslate.js |
— | — | @@ -209,10 +209,10 @@ |
210 | 210 | |
211 | 211 | element.contents().each( function() { |
212 | 212 | // If it's a text node, then translate it. |
213 | | - if ( this.nodeType == 3 && this.wholeText.trim().length > 0 ) { |
| 213 | + if ( this.nodeType == 3 && this.data != undefined && this.data.trim().length > 0 ) { |
214 | 214 | runningJobs++; |
215 | 215 | translateChunk( |
216 | | - this.wholeText.split( new RegExp( "(\\S.+?[.!?])(?=\\s+|$)", "gi" ) ), |
| 216 | + this.data.split( new RegExp( "(\\S.+?[.!?])(?=\\s+|$)", "gi" ) ), |
217 | 217 | [], |
218 | 218 | maxChunkLength, |
219 | 219 | sourceLang, |