Skip to content

Commit 2d95439

Browse files
Fix global fetchState status for anonymous requests
1 parent 987a7d5 commit 2d95439

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

audienceproject-data-web.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -510,7 +510,7 @@ export const fetch = (customerId, customerOptions, callback) => {
510510
...data,
511511
};
512512

513-
fetchStatus.state = statusCode.code > 0 ? fetchStateReady : fetchStateFailed;
513+
fetchStatus.state = parseInt(statusCode.code, 10) > 0 ? fetchStateReady : fetchStateFailed;
514514
fetchStatus.result = result;
515515
fetchStatus.options = options;
516516

test.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
<!DOCTYPE html>
2+
<meta charset="utf-8">
23
<meta http-equiv="Content-Security-Policy" content="default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'unsafe-inline'; connect-src https://pdw-usr.userreport.com https://dnt-userreport.com">
34

45
<title>AudienceProject Data Web Test</title>

0 commit comments

Comments
 (0)