don't fail if value is not yet a string

This commit is contained in:
j 2022-11-15 14:36:06 +01:00
parent 472bdc64de
commit 48b2c1f2ba

View file

@ -244,7 +244,7 @@ Ox.decodeDeflate = function(string, callback) {
(function() {
function replace(string) {
return string.replace(/%(?![0-9A-Fa-f]{2})/g, '%25')
return string.toString().replace(/%(?![0-9A-Fa-f]{2})/g, '%25')
.replace(/(%[0-9A-Fa-f]{2})+/g, function(match) {
var hex = match.split('%').slice(1), ret;
Ox.forEach(Ox.range(1, hex.length + 1), function(length) {