Check for input type and string length before sanitizing a URL

This commit is contained in:
Kyle Shockey
2017-10-31 12:35:08 -07:00
parent 164747d407
commit 1aa1907128
2 changed files with 16 additions and 0 deletions

View File

@@ -723,6 +723,10 @@ export const shallowEqualKeys = (a,b, keys) => {
}
export function sanitizeUrl(url) {
if(typeof url !== "string" || url === "") {
return ""
}
return braintreeSanitizeUrl(url)
}