Skip to content

Commit

Permalink
Fixed: check if data.requests exists before attempting to access it.
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan0sz committed Jul 30, 2024
1 parent c638e64 commit 7589839
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 96 deletions.
2 changes: 1 addition & 1 deletion assets/src/js/integrations/woocommerce.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ window.fetch = (...args) => {

let data = JSON.parse(config.body);

if (data.requests === undefined || data.requests === null) {
if (data === null || data.requests === undefined || !data.requests instanceof Array) {
return originalFetch(resource, config);
}

Expand Down
Loading

0 comments on commit 7589839

Please sign in to comment.