Use includes() to check for existence

This commit is contained in:
jamesgeorge007
2019-09-24 00:01:50 +05:30
parent 53f3af6944
commit e6387c694e

View File

@@ -517,7 +517,7 @@
value
}) => `${key}=${value}`).join('&')
queryString = queryString === '' ? '' : `?${queryString}`
if(path.indexOf('?') !== -1) {
if(path.includes('?')) {
path = path.slice(0, path.indexOf('?')) + queryString;
} else {
path = path + queryString