1
0
Fork 0

fix for invalid input

This commit is contained in:
Jan Steemann 2016-01-25 11:05:51 +01:00
parent 3eddff7fbc
commit c5d50871c2
1 changed files with 3 additions and 2 deletions

View File

@ -2326,7 +2326,7 @@ function AQL_SPLIT (value, separator, limit) {
function AQL_SUBSTITUTE (value, search, replace, limit) {
'use strict';
var pattern, patterns, replacements = { }, sWeight = TYPEWEIGHT(search);
var pattern = "", patterns, replacements = { }, sWeight = TYPEWEIGHT(search);
value = AQL_TO_STRING(value);
if (sWeight === TYPEWEIGHT_OBJECT) {
@ -2385,7 +2385,8 @@ function AQL_SUBSTITUTE (value, search, replace, limit) {
}
pattern = patterns.join('|');
}
else {
if (pattern === "") {
return value;
}