Skip to content

Commit

Permalink
Use includes
Browse files Browse the repository at this point in the history
  • Loading branch information
tgolen committed Dec 4, 2024
1 parent 4ae6548 commit c0d27d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/libs/E2E/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ const defaultRequestInit: RequestInit = {

const sendRequest = (url: string, data: Record<string, unknown>): Promise<Response> => {
// Don't process these specific API commands because running them over and over again in the tests hammers the server in a bad way.
if (url.indexOf('command=OptInToPushNotifications') > -1 || url.indexOf('command=OptOutOfPushNotifications') > -1) {
if (url.includes('command=OptInToPushNotifications') || url.includes('command=OptOutOfPushNotifications')) {
return Promise.resolve(new Response());
}

Expand Down

0 comments on commit c0d27d4

Please sign in to comment.