mirror of
https://github.com/beautifier/js-beautify.git
synced 2024-11-27 14:40:23 +00:00
Fix possible str.replace freeze when unpacking packer
This commit is contained in:
parent
a3a091c8c1
commit
4dfe268087
@ -25,7 +25,7 @@ var P_A_C_K_E_R = {
|
||||
unpack: function (str) {
|
||||
var chunks = P_A_C_K_E_R.get_chunks(str);
|
||||
for(var i = 0; i < chunks.length; i++) {
|
||||
str = str.replace(chunks[i], P_A_C_K_E_R.unpack_chunk(chunks[i]))
|
||||
str = str.split(chunks[i]).join( P_A_C_K_E_R.unpack_chunk(chunks[i]) );
|
||||
}
|
||||
return str;
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user