Skip to content

Commit 898ab9e

Browse files
AlfredJKwackbriangonzalez
AlfredJKwack
authored andcommitted
Fix CORS test - Issue #58
CORS test got inverted in v2. The point is to add CORS Anon when the source is not a data string.
1 parent fef4014 commit 898ab9e

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/helpers.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export const getImageData = (src: string, scale: number = 1): Promise<Uint8Clamp
1111

1212
// Can't set cross origin to be anonymous for data url's
1313
// https://github.com/mrdoob/three.js/issues/1305
14-
if (src.startsWith('data')) img.crossOrigin = 'Anonymous'
14+
if (!src.startsWith('data')) img.crossOrigin = 'Anonymous'
1515

1616
return new Promise((resolve, reject) => {
1717
img.onload = function () {

0 commit comments

Comments
 (0)