Skip to content

Commit fe76e1f

Browse files
committed
Merge pull request aadsm#46 from janryWang/master
Update bufferedbinaryajax.js
2 parents 32733e0 + 506e9ed commit fe76e1f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/bufferedbinaryajax.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,10 +236,12 @@ var BufferedBinaryAjax = function(strUrl, fncCallback, fncError) {
236236
*/
237237
this.getByteAt = function(iOffset) {
238238
var block = getBlockAtOffset(iOffset);
239-
if( typeof block.data == "string" ) {
239+
if( block && typeof block.data == "string" ) {
240240
return block.data.charCodeAt(iOffset - block.offset) & 0xFF;
241-
} else if( typeof block.data == "unknown" ) {
241+
} else if( block && typeof block.data == "unknown" ) {
242242
return IEBinary_getByteAt(block.data, iOffset - block.offset);
243+
} else {
244+
return ""
243245
}
244246
};
245247

0 commit comments

Comments
 (0)