You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
RangeError: Invalid string length
at replace_armored_block_type (/js/common/common.js:1515:67)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
at replace_armored_block_type (/js/common/common.js:1516:12)
Somewhere here:
function replace_armored_block_type(text, block_headers, end_required, block_processor, optional_search_after_index) {
var begin_index = text.indexOf(block_headers.begin, optional_search_after_index);
if(begin_index < 0) {
return text;
}
var end_found = -1;
var end_len = 0;
if(typeof block_headers.end.exec === 'undefined') { // end defined by string
end_found = text.indexOf(block_headers.end, begin_index);
end_len = block_headers.end.length;
} else {
var regex_end_found = block_headers.end.exec(text);
if(regex_end_found) {
end_found = regex_end_found.index;
end_len = regex_end_found[0].length;
}
}
var end_index;
if(end_found < 0) {
if(end_required) {
return text;
} else {
end_index = text.length - 1; // end not found + not required, get everything (happens for long clipped messages)
}
} else {
end_index = end_found + end_len;
}
var block_replacement = '\n' + block_processor(text.substring(begin_index, end_index), end_found > 0) + '\n';
var text_with_replaced_block = text.substring(0, begin_index) + block_replacement + text.substring(end_index, text.length);
return replace_armored_block_type(text_with_replaced_block, block_headers, end_required, block_processor, begin_index + block_replacement.length);
}
The text was updated successfully, but these errors were encountered:
Somewhere here:
The text was updated successfully, but these errors were encountered: