Merge pull request #357 from Safelite/defect/CSR-506

RegEx support for Safari
This commit is contained in:
Frank Rua 2022-04-20 12:25:46 -04:00 committed by GitHub
commit 3b351f2342
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -67,9 +67,9 @@ export function getDeviceIdValue(){
return cookieValuesSplit[1];
}
const cookieValueMatch = cookieValue.match("(?<=did=).*?(?=&)");
const cookieValueMatch = cookieValue.match("^did=[a-f0-9]{8}(?:-[a-f0-9]{4}){3}-[a-f0-9]{12}");
if(cookieValueMatch){
return cookieValueMatch[0];
return cookieValueMatch[0].split('=')[1];
}
return '';