Skip to content

Commit

Permalink
fix: [#1485] Typo in CORS rejection error message (#1486)
Browse files Browse the repository at this point in the history
Co-authored-by: David Ortner <david@ortner.se>
  • Loading branch information
rexxars and capricorn86 authored Aug 29, 2024
1 parent df69f9e commit 0e3d424
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/happy-dom/src/fetch/Fetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -142,10 +142,10 @@ export default class Fetch {

if (!compliesWithCrossOriginPolicy) {
this.#window.console.warn(
`Cross-Origin Request Blocked: The Same Origin Policy dissallows reading the remote resource at "${this.request.url}".`
`Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at "${this.request.url}".`
);
throw new this.#window.DOMException(
`Cross-Origin Request Blocked: The Same Origin Policy dissallows reading the remote resource at "${this.request.url}".`,
`Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at "${this.request.url}".`,
DOMExceptionNameEnum.networkError
);
}
Expand Down
4 changes: 2 additions & 2 deletions packages/happy-dom/src/fetch/SyncFetch.ts
Original file line number Diff line number Diff line change
Expand Up @@ -127,10 +127,10 @@ export default class SyncFetch {

if (!this.compliesWithCrossOriginPolicy()) {
this.#window.console.warn(
`Cross-Origin Request Blocked: The Same Origin Policy dissallows reading the remote resource at "${this.request.url}".`
`Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at "${this.request.url}".`
);
throw new this.#window.DOMException(
`Cross-Origin Request Blocked: The Same Origin Policy dissallows reading the remote resource at "${this.request.url}".`,
`Cross-Origin Request Blocked: The Same Origin Policy disallows reading the remote resource at "${this.request.url}".`,
DOMExceptionNameEnum.networkError
);
}
Expand Down

0 comments on commit 0e3d424

Please sign in to comment.