Merge pull request #357 from Safelite/defect/CSR-506
RegEx support for Safari
This commit is contained in:
commit
3b351f2342
1 changed files with 2 additions and 2 deletions
|
|
@ -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 '';
|
||||
|
|
|
|||
Loading…
Reference in a new issue