Closed JohannesFluegel closed 3 years ago
https://github.com/gs1/GS1DL-resolver-testsuite/blob/master/GS1DigitalLinkResolverTestSuite.js#L268
Change if (data.result['access-control-allow-origin'] !== '') simply into if (data.result['access-control-allow-origin']). If this header is not set, it will result into undefined instead of empty string. And undefined always unequals empty string.
if (data.result['access-control-allow-origin'] !== '')
if (data.result['access-control-allow-origin'])
Thank you @JohannesFluegel!
https://github.com/gs1/GS1DL-resolver-testsuite/blob/master/GS1DigitalLinkResolverTestSuite.js#L268
Change
if (data.result['access-control-allow-origin'] !== '')
simply intoif (data.result['access-control-allow-origin'])
. If this header is not set, it will result into undefined instead of empty string. And undefined always unequals empty string.